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:
leo60228 2021-09-07 11:46:39 -04:00 committed by Misa Elizabeth Kai
parent d40af63aa3
commit 7560b8b60b
1 changed files with 0 additions and 3 deletions

View File

@ -347,8 +347,6 @@ 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;
@ -358,7 +356,6 @@ void KeyPoll::Poll(void)
music.pauseef();
}
}
#endif
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0)
{