Fix resolution desync if resize occurs during the loading screen.

This commit is contained in:
elasota
2021-02-20 15:11:31 -05:00
parent 83d37a7c94
commit 484e18a9af

View File

@@ -55,6 +55,7 @@ DrawSurface *loadScreenRingSurface;
void ReadInPrefs (void);
void WriteOutPrefs (void);
void HandleSplashResolutionChange (void);
int main(int argc, const char **argv);
@@ -1137,16 +1138,27 @@ int gpAppMain()
loadScreenRingSurface = nullptr;
}
bool resolutionChanged = false;
if (!isPrefsLoaded)
{
WriteOutPrefs();
if (thisMac.isResolutionDirty)
{
resolutionChanged = true;
FlushResolutionChange();
}
ShowInitialLaunchDisclaimer();
}
FlushResolutionChange();
if (thisMac.isResolutionDirty)
resolutionChanged = true;
if (resolutionChanged)
HandleSplashResolutionChange();
else
OpenMainWindow();
if (isDoColorFade)