diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-15 00:12:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-15 00:12:13 +0300 |
commit | a570c54e39c9a5f626db2453690cb7800d09cea3 (patch) | |
tree | e9c1274156420558d3449ea46c09f13c05828734 /src/eventsmanager.cpp | |
parent | 37a45b2e957dc645b6430bec4d955c35b46e07f3 (diff) | |
download | plus-a570c54e39c9a5f626db2453690cb7800d09cea3.tar.gz plus-a570c54e39c9a5f626db2453690cb7800d09cea3.tar.bz2 plus-a570c54e39c9a5f626db2453690cb7800d09cea3.tar.xz plus-a570c54e39c9a5f626db2453690cb7800d09cea3.zip |
Set normal and low fps limit also before connecting to game.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r-- | src/eventsmanager.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 28b50ba2b..5bc9035f4 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -566,11 +566,9 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event) case SDL_WINDOWEVENT_MINIMIZED: WindowManager::setIsMinimized(true); #ifndef DYECMD - if (inGame && localPlayer) - { - fpsLimit = config.getIntValue("altfpslimit"); + fpsLimit = config.getIntValue("altfpslimit"); + if (localPlayer) localPlayer->setHalfAway(true); - } #endif // DYECMD setPriority(false); @@ -579,14 +577,9 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event) case SDL_WINDOWEVENT_MAXIMIZED: WindowManager::setIsMinimized(false); #ifndef DYECMD - if (inGame) - { - if (localPlayer) - { - fpsLimit = config.getIntValue("fpslimit"); - localPlayer->setHalfAway(false); - } - } + fpsLimit = config.getIntValue("fpslimit"); + if (localPlayer) + localPlayer->setHalfAway(false); #endif // DYECMD setPriority(true); @@ -627,7 +620,7 @@ void EventsManager::handleActive(const SDL_Event &event) { // window restore WindowManager::setIsMinimized(false); #ifndef DYECMD - if (inGame && (localPlayer != nullptr)) + if (localPlayer != nullptr) { if (!settings.awayMode) fpsLimit = config.getIntValue("fpslimit"); @@ -644,7 +637,7 @@ void EventsManager::handleActive(const SDL_Event &event) #else // ANDROID WindowManager::setIsMinimized(true); #ifndef DYECMD - if (inGame && (localPlayer != nullptr) && !settings.awayMode) + if (localPlayer != nullptr && !settings.awayMode) { fpsLimit = config.getIntValue("altfpslimit"); localPlayer->setHalfAway(true); |