From 3fac30d570918a853a236c75fe985a2d732e7f75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Sep 2011 22:56:19 +0300 Subject: Fix fps switching after game window set active. --- src/game.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/game.cpp') 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 { -- cgit v1.2.3-70-g09d2