From 7560b8b60bbebcfcf7d962eb55942a22c0605189 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Tue, 7 Sep 2021 11:46:39 -0400 Subject: [PATCH] Handle lost focus on Emscripten This was previously disabled, since it didn't seem to work. However, the previous commit fixes the root issue. --- desktop_version/src/KeyPoll.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index 5e56be2d..409ecc4f 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -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) {