Fix large screen prompt not showing on first run
desktopWidth/desktopHeight were initialized only at the end of SDLOpen, after we checked if larger scales were supported. Need to initialize the window first, then recreate the window after if the scale can be larger. The window won't be centered, but otherwise it works.
This commit is contained in:
parent
5160f4ad33
commit
eef8943a3c
@ -445,19 +445,20 @@ int Main(int argc, char *argv[])
|
||||
engine.Begin();
|
||||
engine.SetFastQuit(prefs.Get("FastQuit", true));
|
||||
engine.TouchUI = prefs.Get("TouchUI", DEFAULT_TOUCH_UI);
|
||||
engine.windowFrameOps = windowFrameOps;
|
||||
|
||||
SDLOpen();
|
||||
|
||||
if (Client::Ref().IsFirstRun() && FORCE_WINDOW_FRAME_OPS == forceWindowFrameOpsNone)
|
||||
{
|
||||
auto guessed = GuessBestScale();
|
||||
if (windowFrameOps.scale != guessed)
|
||||
if (engine.windowFrameOps.scale != guessed)
|
||||
{
|
||||
windowFrameOps.scale = guessed;
|
||||
engine.windowFrameOps.scale = guessed;
|
||||
prefs.Set("Scale", windowFrameOps.scale);
|
||||
showLargeScreenDialog = true;
|
||||
}
|
||||
}
|
||||
engine.windowFrameOps = windowFrameOps;
|
||||
|
||||
SDLOpen();
|
||||
|
||||
bool enableBluescreen = USE_BLUESCREEN && !true_arg(arguments["disable-bluescreen"]);
|
||||
if (enableBluescreen)
|
||||
|
Loading…
Reference in New Issue
Block a user