# HG changeset patch # User darkvater # Date 1111697241 0 # Node ID a69e1b3b777474f30e1a7fd335c63015b0fc9a7c # Parent b6c044db8bb140992be4dc16fccbfe7e19e624a6 (svn r2052) - Fix Regression: ALT+F4 once again shuts down openttd in windows and F10, etc. is fixed. diff -r b6c044db8bb1 -r a69e1b3b7774 win32.c --- a/win32.c Thu Mar 24 19:40:48 2005 +0000 +++ b/win32.c Thu Mar 24 20:47:21 2005 +0000 @@ -330,9 +330,12 @@ return 0; case VK_MENU: /* Just ALT */ return 0; // do nothing + 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; - return 0; + break; } break; case WM_NCMOUSEMOVE: @@ -711,13 +714,14 @@ #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;