diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-13 22:56:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-13 22:56:19 +0300 |
commit | 3fac30d570918a853a236c75fe985a2d732e7f75 (patch) | |
tree | 4dad8fcb6f06ed6c8c8de3754ce6547957b256dd | |
parent | f63968bea4476ee87c75d59fb6c9068bab9a78d2 (diff) | |
download | mv-3fac30d570918a853a236c75fe985a2d732e7f75.tar.gz mv-3fac30d570918a853a236c75fe985a2d732e7f75.tar.bz2 mv-3fac30d570918a853a236c75fe985a2d732e7f75.tar.xz mv-3fac30d570918a853a236c75fe985a2d732e7f75.zip |
Fix fps switching after game window set active.
-rw-r--r-- | src/game.cpp | 15 |
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 { |