summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-09-08 14:59:58 +0000
committerglx <glx@openttd.org>2007-09-08 14:59:58 +0000
commit1713d89374fa944eb496476e735086f489635cbc (patch)
tree37dcdb03ae43945432a6e7841275c47a7ebb52e9 /src/video
parent82f6a90a56feb0380b328a514be7dbbee2682930 (diff)
downloadopenttd-1713d89374fa944eb496476e735086f489635cbc.tar.xz
(svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
Diffstat (limited to 'src/video')
-rw-r--r--src/video/win32_v.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 58bd5c034..2b6b01784 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -494,6 +494,9 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
* WM_KEYDOWN only handles CTRL+ commands and special keys like VK_LEFT, etc. */
if (keycode == 0 || (keycode > WKC_PAUSE && GB(keycode, 13, 4) == 0)) return 0;
+ /* Keys handled in WM_CHAR */
+ if ((uint)(GB(keycode, 0, 12) - WKC_NUM_DIV) <= WKC_MINUS - WKC_NUM_DIV) return 0;
+
HandleKeypress(0 | (keycode << 16));
return 0;
}