From fca50346e48e864a97471b02277363892b554601 Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 9 Dec 2025 20:02:51 -0500 Subject: [PATCH] Restore option to switch to window mode at runtime --- Source/utils/display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/utils/display.cpp b/Source/utils/display.cpp index 8a802244f..1a39ca532 100644 --- a/Source/utils/display.cpp +++ b/Source/utils/display.cpp @@ -830,7 +830,8 @@ void SetFullscreenMode() #if USE_SDL3 if (!SDL_SetWindowFullscreen(ghMainWnd, *GetOptions().Graphics.fullscreen)) ErrSdl(); #else - if (SDL_SetWindowFullscreen(ghMainWnd, *GetOptions().Graphics.upscale ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN) != 0) ErrSdl(); + const Uint32 flags = *GetOptions().Graphics.upscale ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN; + if (SDL_SetWindowFullscreen(ghMainWnd, *GetOptions().Graphics.fullscreen ? flags : 0) != 0) ErrSdl(); #endif if (!*GetOptions().Graphics.fullscreen) {