diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-14 23:42:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-14 23:42:27 +0300 |
commit | 4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b (patch) | |
tree | 4ef2eb3dbaf6a7564f21cdc91bfd8202184ccf1e /src | |
parent | 6129271291775f6ddd69101c93d2917231142038 (diff) | |
download | manaverse-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.gz manaverse-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.bz2 manaverse-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.tar.xz manaverse-4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b.zip |
Fix low fps mode if client in away mode with focused input (SDL2).
Diffstat (limited to 'src')
-rw-r--r-- | src/eventsmanager.cpp | 12 |
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); } } |