mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Handle lost focus on Emscripten
This was previously disabled, since it didn't seem to work. However, the previous commit fixes the root issue.
This commit is contained in:
parent
d40af63aa3
commit
7560b8b60b
1 changed files with 0 additions and 3 deletions
|
@ -347,8 +347,6 @@ 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;
|
||||||
|
@ -358,7 +356,6 @@ void KeyPoll::Poll(void)
|
||||||
music.pauseef();
|
music.pauseef();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
|
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue