diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-28 15:41:03 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2021-02-28 18:04:51 +0000 |
commit | c3dc27e37e177675c8a54ef507de48b61ed6da2c (patch) | |
tree | e42eb666cf8f22c17a0a4042bc62043ecda6c3b8 /src/video/win32_v.cpp | |
parent | 73fd634209a9d54dd167a579e4bb3cced177b896 (diff) | |
download | openttd-c3dc27e37e177675c8a54ef507de48b61ed6da2c.tar.xz |
Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r-- | src/video/win32_v.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 131a991f3..d5f752be9 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -13,7 +13,6 @@ #include "../os/windows/win32.h" #include "../rev.h" #include "../blitter/factory.hpp" -#include "../network/network.h" #include "../core/geometry_func.hpp" #include "../core/math_func.hpp" #include "../core/random_func.hpp" @@ -831,17 +830,12 @@ void VideoDriver_Win32Base::InputLoop() _shift_pressed = this->has_focus && GetAsyncKeyState(VK_SHIFT) < 0; #if defined(_DEBUG) - if (_shift_pressed) + this->fast_forward_key_pressed = _shift_pressed; #else /* Speedup when pressing tab, except when using ALT+TAB * to switch to another application. */ - if (this->has_focus && GetAsyncKeyState(VK_TAB) < 0 && GetAsyncKeyState(VK_MENU) >= 0) + this->fast_forward_key_pressed = this->has_focus && GetAsyncKeyState(VK_TAB) < 0 && GetAsyncKeyState(VK_MENU) >= 0; #endif - { - if (!_networking && _game_mode != GM_MENU) _fast_forward |= 2; - } else if (_fast_forward & 2) { - _fast_forward = 0; - } /* Determine which directional keys are down. */ if (this->has_focus) { |