summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-02-22 22:14:27 +0000
committerdarkvater <darkvater@openttd.org>2005-02-22 22:14:27 +0000
commit0abd611c0a37f8d424c51c8ce2b07cf3fc6f50af (patch)
tree88ebb0e1eb51ec60d03b9fa39c11d47f75a120b2
parent0ddbc1304b161aad6583bd632634723645435f60 (diff)
downloadopenttd-0abd611c0a37f8d424c51c8ce2b07cf3fc6f50af.tar.xz
(svn r1907) - Fix: [ 1114261 ] Speeding up when pressing ALT+TAB (Windows)
-rw-r--r--win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32.c b/win32.c
index 10b6d4212..60e7d2915 100644
--- a/win32.c
+++ b/win32.c
@@ -700,13 +700,13 @@ static int Win32GdiMainLoop(void)
#else
if (_wnd.has_focus && GetAsyncKeyState(VK_TAB) < 0) {
#endif
- if (!_networking && _game_mode != GM_MENU) _fast_forward |= 2;
- } else if (_fast_forward&2) {
+ /* Disable speeding up game with ALT+TAB (if syskey is pressed, the
+ * real key is in the upper 16 bits (see WM_SYSKEYDOWN in WndProcGdi()) */
+ if (((_pressed_key>>16) & WKC_TAB) && !_networking && _game_mode != GM_MENU) _fast_forward |= 2;
+ } else if (_fast_forward & 2)
_fast_forward = 0;
- }
-
- cur_ticks=GetTickCount();
+ cur_ticks = GetTickCount();
if ((_fast_forward && !_pause) || cur_ticks > next_tick)
next_tick = cur_ticks;