From 506628cef1e618d9238d63fa5aea92a7adc54e13 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sat, 13 Jun 2020 10:23:52 -0400 Subject: [PATCH] Revert "Fix unfocusing the game while in fullscreen mode" This reverts commit c322ae131e599562aee019ebec0fbc384fed0095. --- desktop_version/src/KeyPoll.cpp | 4 ---- desktop_version/src/main.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index d68c00b9..43a99efa 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -251,7 +251,6 @@ void KeyPoll::Poll() SDL_SetWindowFullscreen(window, 0); } SDL_DisableScreenSaver(); - resetWindow = true; } else if (evt.window.event == SDL_WINDOWEVENT_FOCUS_LOST) { @@ -264,19 +263,16 @@ void KeyPoll::Poll() ); } SDL_EnableScreenSaver(); - resetWindow = true; } /* Mouse Focus */ else if (evt.window.event == SDL_WINDOWEVENT_ENTER) { SDL_DisableScreenSaver(); - resetWindow = true; } else if (evt.window.event == SDL_WINDOWEVENT_LEAVE) { SDL_EnableScreenSaver(); - resetWindow = true; } } diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 12b5fe29..fe9b7cb4 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -545,11 +545,11 @@ int main(int argc, char *argv[]) } } - if (key.resetWindow) - { - key.resetWindow = false; - gameScreen.ResizeScreen(-1, -1); - } + if(key.resetWindow) + { + key.resetWindow = false; + gameScreen.ResizeScreen(-1, -1); + } music.processmusic(); graphics.processfade();