same workaround for SDL 2.0.16 (#261)

This commit is contained in:
Roman Fomin 2021-08-27 17:40:40 +07:00 committed by GitHub
parent cea09ef5e9
commit b1e5a3b7e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1362,12 +1362,12 @@ static void I_InitGraphicsMode(void)
SDL_TEXTUREACCESS_STREAMING, SDL_TEXTUREACCESS_STREAMING,
v_w, v_h); v_w, v_h);
// Workaround for SDL 2.0.14 alt-tab bug (taken from Doom Retro) // Workaround for SDL 2.0.14 (and 2.0.16) alt-tab bug (taken from Doom Retro)
#if defined(_WIN32) #if defined(_WIN32)
{ {
SDL_version ver; SDL_version ver;
SDL_GetVersion(&ver); SDL_GetVersion(&ver);
if (ver.major == 2 && ver.minor == 0 && ver.patch == 14) if (ver.major == 2 && ver.minor == 0 && (ver.patch == 14 || ver.patch == 16))
{ {
SDL_SetHintWithPriority(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1", SDL_HINT_OVERRIDE); SDL_SetHintWithPriority(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1", SDL_HINT_OVERRIDE);
} }