diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-18 21:47:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-18 22:27:06 +0300 |
commit | e73c5ecc896c14fa43b19e42e5b24c79766cdb44 (patch) | |
tree | 9ee72afa6d4b8e150534f64a6c15085d1ce168b9 /src/game.cpp | |
parent | 25907c03212110f10c910b0ef90a416dff450ca7 (diff) | |
download | manaverse-e73c5ecc896c14fa43b19e42e5b24c79766cdb44.tar.gz manaverse-e73c5ecc896c14fa43b19e42e5b24c79766cdb44.tar.bz2 manaverse-e73c5ecc896c14fa43b19e42e5b24c79766cdb44.tar.xz manaverse-e73c5ecc896c14fa43b19e42e5b24c79766cdb44.zip |
Change process priority depend on game state.
implimented only for windows version.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index c024c41dc..d5cebe6a1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -89,6 +89,7 @@ #include "utils/gettext.h" #include "utils/mkdir.h" #include "utils/physfstools.h" +#include "utils/process.h" #include <guichan/exception.hpp> #include <guichan/focushandler.hpp> @@ -863,6 +864,7 @@ void Game::handleActive(const SDL_Event &event) fpsLimit = config.getIntValue("fpslimit"); if (player_node) player_node->setHalfAway(false); + setPriority(true); } else { // window minimisation @@ -875,6 +877,7 @@ void Game::handleActive(const SDL_Event &event) fpsLimit = config.getIntValue("altfpslimit"); player_node->setHalfAway(true); } + setPriority(false); #endif } if (player_node) |