mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-27 15:10:30 -04:00
Workaround for SDL 2.0.14 alt-tab bug (#105)
* Workaround for SDL 2.0.14 alt-tab bug * Add run-time and build-time check * Add block scope
This commit is contained in:
parent
841d53053e
commit
cb98e17d72
@ -1208,6 +1208,18 @@ 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)
|
||||||
|
#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();
|
V_Init();
|
||||||
|
|
||||||
UpdateGrab();
|
UpdateGrab();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user