summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-13 22:56:19 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-13 22:56:19 +0300
commit3fac30d570918a853a236c75fe985a2d732e7f75 (patch)
tree4dad8fcb6f06ed6c8c8de3754ce6547957b256dd
parentf63968bea4476ee87c75d59fb6c9068bab9a78d2 (diff)
downloadplus-3fac30d570918a853a236c75fe985a2d732e7f75.tar.gz
plus-3fac30d570918a853a236c75fe985a2d732e7f75.tar.bz2
plus-3fac30d570918a853a236c75fe985a2d732e7f75.tar.xz
plus-3fac30d570918a853a236c75fe985a2d732e7f75.zip
Fix fps switching after game window set active.
-rw-r--r--src/game.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 4762055fa..d82f13913 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1391,16 +1391,13 @@ void Game::handleInput()
if (event.active.state & SDL_APPMOUSEFOCUS)
Client::setMouseFocused(event.active.gain);
- if (player_node)
+ if (player_node && player_node->getAwayMode())
{
- if (player_node->getAwayMode())
- {
- if (Client::getInputFocused() || Client::getMouseFocused())
- fpsLimit = config.getIntValue("fpslimit");
- else
- fpsLimit = config.getIntValue("altfpslimit");
- Client::setFramerate(fpsLimit);
- }
+ if (Client::getInputFocused() || Client::getMouseFocused())
+ fpsLimit = config.getIntValue("fpslimit");
+ else
+ fpsLimit = config.getIntValue("altfpslimit");
+ Client::setFramerate(fpsLimit);
}
else
{