1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Disable unfocus on Emscripten

This commit is contained in:
leo60228 2021-03-31 15:12:13 -04:00 committed by Misa Elizabeth Kai
parent 0063e1c3bc
commit 46ee84d6ef

View file

@ -347,6 +347,8 @@ void KeyPoll::Poll(void)
SDL_DisableScreenSaver();
break;
case SDL_WINDOWEVENT_FOCUS_LOST:
// For some reason, SDL_WINDOWEVENT_FOCUS_GAINED doesn't seem to get sent on Emscripten.
#ifndef __EMSCRIPTEN__
if (!game.disablepause)
{
isActive = false;
@ -356,6 +358,8 @@ void KeyPoll::Poll(void)
music.pauseef();
}
}
#endif
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
{
wasFullscreen = !graphics.screenbuffer->isWindowed;