diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-09 22:54:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-09 22:56:17 +0300 |
commit | 481ea0b776bbab92b500540f59c5a191c6e93cba (patch) | |
tree | 5b73e15b5ab16d67095852d83ba764d83c36cbb8 /src/game.cpp | |
parent | c108b00ddc98e99182bf1a0f83602772f4931122 (diff) | |
download | manaverse-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.gz manaverse-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.bz2 manaverse-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.xz manaverse-481ea0b776bbab92b500540f59c5a191c6e93cba.zip |
Add workaround for fix alt-tab issue in SDL2.
Also add option to enable/disable this workaround.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 7a66c0b19..ad819230b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1002,10 +1002,15 @@ void Game::updateFrameRate(int fpsLimit) { if (settings.awayMode) { - if (settings.inputFocused || settings.mouseFocused) + if (settings.inputFocused != KeyboardFocus::Unfocused || + settings.mouseFocused) + { fpsLimit = config.getIntValue("fpslimit"); + } else + { fpsLimit = config.getIntValue("altfpslimit"); + } } else { |