mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-10 03:31:30 -06:00
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
This commit is contained in:
parent
f245cf76a7
commit
64e10e6f98
@ -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<Input::SDLInputEngine>());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user