diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index bce3720e..954432bb 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -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;