summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-15 00:12:13 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-15 00:12:13 +0300
commita570c54e39c9a5f626db2453690cb7800d09cea3 (patch)
treee9c1274156420558d3449ea46c09f13c05828734
parent37a45b2e957dc645b6430bec4d955c35b46e07f3 (diff)
downloadplus-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.
-rw-r--r--src/eventsmanager.cpp21
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);