From 58dd352def76d6cc01b399c457dc029258549d0b Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 28 Nov 2020 10:19:17 +1100 Subject: [PATCH] [client] set fullscreen after window creation to keep window dimensions --- client/src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/main.c b/client/src/main.c index f502b0fc..a55a6761 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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");