mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Disable unfocus on Emscripten
This commit is contained in:
parent
0063e1c3bc
commit
46ee84d6ef
1 changed files with 4 additions and 0 deletions
|
@ -347,6 +347,8 @@ void KeyPoll::Poll(void)
|
||||||
SDL_DisableScreenSaver();
|
SDL_DisableScreenSaver();
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
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)
|
if (!game.disablepause)
|
||||||
{
|
{
|
||||||
isActive = false;
|
isActive = false;
|
||||||
|
@ -356,6 +358,8 @@ void KeyPoll::Poll(void)
|
||||||
music.pauseef();
|
music.pauseef();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
|
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
|
||||||
{
|
{
|
||||||
wasFullscreen = !graphics.screenbuffer->isWindowed;
|
wasFullscreen = !graphics.screenbuffer->isWindowed;
|
||||||
|
|
Loading…
Reference in a new issue