mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-31 22:05:10 +02:00
Fix switching to exclusive fullscreen to borderless windowed
This commit is contained in:
parent
0c83e34093
commit
7e00a702c1
@ -220,6 +220,9 @@ void ScreenHandler::updateWindowState()
|
|||||||
{
|
{
|
||||||
case EWindowMode::FULLSCREEN_EXCLUSIVE:
|
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_SetWindowFullscreen(mainWindow, SDL_WINDOW_FULLSCREEN);
|
||||||
|
|
||||||
SDL_DisplayMode mode;
|
SDL_DisplayMode mode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user