From 64e10e6f981c101e1cf85381260db8e5c3bc7fb8 Mon Sep 17 00:00:00 2001 From: Semahegn <83661382+Seme30@users.noreply.github.com> Date: Thu, 19 Mar 2026 11:02:03 +0300 Subject: [PATCH] sdl_window: Call SDL_SyncWindow after setting fullscreen mode (#4131) SDL_SetWindowFullscreen is asynchronous on Windows. Without SDL_SyncWindow, the window may not have finished transitioning to borderless fullscreen before the Vulkan surface and swapchain are created, causing borderless mode to silently fail at startup. This is most visible with Immediate (No VSync) present mode where the swapchain is created quickly, but the fix is correct for all present modes. SDL3 docs state: "On asynchronous windowing systems, this acts as a synchronization barrier for pending window state." and SDL_SyncWindow is listed as the recommended follow-up to SDL_SetWindowFullscreen. https://wiki.libsdl.org/SDL3/SDL_SyncWindow Fixes #3945 --- src/sdl_window.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index ae4646de6..838fc4db4 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -323,6 +323,7 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_ window, Config::getFullscreenMode() == "Fullscreen" ? displayMode : NULL); } SDL_SetWindowFullscreen(window, Config::getIsFullscreen()); + SDL_SyncWindow(window); SDL_InitSubSystem(SDL_INIT_GAMEPAD); controller->SetEngine(std::make_unique());