mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Disable unfocus on Emscripten
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
0063e1c3bc
commit
46ee84d6ef
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user