summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-03-24 20:47:21 +0000
committerdarkvater <darkvater@openttd.org>2005-03-24 20:47:21 +0000
commit877a9f7df7ccc7ee1e4104f1e41b9a492b1367c0 (patch)
tree929a2558dd099e5a848d313873de610590793b68 /win32.c
parent6c08d459d65a616cd6fa3621c84056ca58ea1518 (diff)
downloadopenttd-877a9f7df7ccc7ee1e4104f1e41b9a492b1367c0.tar.xz
(svn r2052) - Fix Regression: ALT+F4 once again shuts down openttd in windows and F10, etc. is fixed.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/win32.c b/win32.c
index 7003e7aef..fefbaaa6d 100644
--- a/win32.c
+++ b/win32.c
@@ -330,9 +330,12 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return 0;
case VK_MENU: /* Just ALT */
return 0; // do nothing
- default: /* ALT in combination with something else */
+ case VK_F10: /* F10, ignore activation of menu */
_pressed_key = MapWindowsKey(wParam) << 16;
return 0;
+ default: /* ALT in combination with something else */
+ _pressed_key = MapWindowsKey(wParam) << 16;
+ break;
}
break;
case WM_NCMOUSEMOVE:
@@ -711,13 +714,14 @@ static int Win32GdiMainLoop(void)
#if defined(_DEBUG)
if (_wnd.has_focus && GetAsyncKeyState(VK_SHIFT) < 0) {
+ if (
#else
if (_wnd.has_focus && GetAsyncKeyState(VK_TAB) < 0) {
-#endif
/* 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)
+ if ((_pressed_key >> 16) & WKC_TAB &&
+#endif
+ !_networking && _game_mode != GM_MENU)
_fast_forward |= 2;
} else if (_fast_forward & 2)
_fast_forward = 0;