From 4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 14 Sep 2017 23:42:27 +0300 Subject: Fix low fps mode if client in away mode with focused input (SDL2). --- src/eventsmanager.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index ddefbddbc..fec747ccc 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -559,13 +559,10 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event) case SDL_WINDOWEVENT_MINIMIZED: WindowManager::setIsMinimized(true); #ifndef DYECMD - if (inGame) + if (inGame && localPlayer) { - if (localPlayer && !settings.awayMode) - { - fpsLimit = config.getIntValue("altfpslimit"); - localPlayer->setHalfAway(true); - } + fpsLimit = config.getIntValue("altfpslimit"); + localPlayer->setHalfAway(true); } #endif // DYECMD @@ -579,8 +576,7 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event) { if (localPlayer) { - if (!settings.awayMode) - fpsLimit = config.getIntValue("fpslimit"); + fpsLimit = config.getIntValue("fpslimit"); localPlayer->setHalfAway(false); } } -- cgit v1.2.3-70-g09d2