[client] set fullscreen after window creation to keep window dimensions

This commit is contained in:
Geoffrey McRae 2020-11-28 10:19:17 +11:00
parent f36c674791
commit 58dd352def

View file

@ -1478,7 +1478,6 @@ static int lg_run()
params.h,
(
SDL_WINDOW_SHOWN |
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
(params.maximize ? SDL_WINDOW_MAXIMIZED : 0) |
@ -1495,6 +1494,9 @@ static int lg_run()
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,
params.minimizeOnFocusLoss ? "1" : "0");
if (params.fullscreen)
SDL_SetWindowFullscreen(state.window, SDL_WINDOW_FULLSCREEN_DESKTOP);
if (!params.noScreensaver)
{
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");