summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-14 23:42:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-14 23:42:27 +0300
commit4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b (patch)
tree4ef2eb3dbaf6a7564f21cdc91bfd8202184ccf1e
parent6129271291775f6ddd69101c93d2917231142038 (diff)
downloadmanaplus-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.gz
manaplus-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.bz2
manaplus-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.xz
manaplus-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.zip
Fix low fps mode if client in away mode with focused input (SDL2).
-rw-r--r--src/eventsmanager.cpp12
1 files 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);
}
}