1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix switching to exclusive fullscreen to borderless windowed

This commit is contained in:
Ivan Savenko 2023-07-05 18:12:41 +03:00
parent 0c83e34093
commit 7e00a702c1

View File

@ -220,6 +220,9 @@ void ScreenHandler::updateWindowState()
{
case EWindowMode::FULLSCREEN_EXCLUSIVE:
{
// for some reason, VCMI fails to switch from FULLSCREEN_BORDERLESS_WINDOWED to FULLSCREEN_EXCLUSIVE directly
// Switch to windowed mode first to avoid this bug
SDL_SetWindowFullscreen(mainWindow, 0);
SDL_SetWindowFullscreen(mainWindow, SDL_WINDOW_FULLSCREEN);
SDL_DisplayMode mode;