diff --git a/Source/i_video.c b/Source/i_video.c index d276615c..ec717435 100644 --- a/Source/i_video.c +++ b/Source/i_video.c @@ -1208,6 +1208,18 @@ static void I_InitGraphicsMode(void) SDL_TEXTUREACCESS_STREAMING, v_w, v_h); + // Workaround for SDL 2.0.14 alt-tab bug (taken from Doom Retro) +#if defined(_WIN32) + { + SDL_version ver; + SDL_GetVersion(&ver); + if (ver.major == 2 && ver.minor == 0 && ver.patch == 14) + { + SDL_SetHintWithPriority(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1", SDL_HINT_OVERRIDE); + } + } +#endif + V_Init(); UpdateGrab();