summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
commit9bb11133522836a9c5e251550ac88c9a4e091c0e (patch)
treef65703ac1a51b79a0766c48420769d28d0847f41 /src/game.cpp
parente55ed9a138e97f6fba5e3b6858a755f8a50197d2 (diff)
downloadplus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.gz
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.bz2
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.xz
plus-9bb11133522836a9c5e251550ac88c9a4e091c0e.zip
Move main window related code into windowmanager.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index addc55ad3..20939a82c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -53,6 +53,7 @@
#include "gui/dialogsmanager.h"
#include "gui/gui.h"
#include "gui/viewport.h"
+#include "gui/windowmanager.h"
#include "gui/windowmenu.h"
#include "gui/fonts/font.h"
@@ -644,7 +645,7 @@ void Game::slowLogic()
}
}
DialogsManager::closeDialogs();
- client->setFramerate(config.getIntValue("fpslimit"));
+ WindowManager::setFramerate(config.getIntValue("fpslimit"));
mNextAdjustTime = cur_time + adjustDelay;
if (client->getState() != STATE_ERROR)
errorMessage.clear();
@@ -687,7 +688,7 @@ void Game::adjustPerfomance()
return;
}
- int maxFps = client->getFramerate();
+ int maxFps = WindowManager::getFramerate();
if (maxFps != config.getIntValue("fpslimit"))
return;
@@ -895,7 +896,7 @@ void Game::updateFrameRate(int fpsLimit)
{
if (player_node && player_node->getAway())
{
- if (client->getInputFocused() || client->getMouseFocused())
+ if (settings.inputFocused || settings.mouseFocused)
fpsLimit = config.getIntValue("fpslimit");
else
fpsLimit = config.getIntValue("altfpslimit");
@@ -905,7 +906,7 @@ void Game::updateFrameRate(int fpsLimit)
fpsLimit = config.getIntValue("fpslimit");
}
}
- client->setFramerate(fpsLimit);
+ WindowManager::setFramerate(fpsLimit);
mNextAdjustTime = cur_time + adjustDelay;
}