Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32events.c @ 3700:076c12750bc4
Fixed bug #743
The arrow keys and keypad arrow keys have almost the same scancodes!
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 27 Jan 2010 05:14:22 +0000 |
parents | f7b03b6838cb |
children | faa9fc8e7f67 |
comparison
equal
deleted
inserted
replaced
3699:4160ba33b597 | 3700:076c12750bc4 |
---|---|
82 } | 82 } |
83 } | 83 } |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 /* Keypad keys are a little trickier, we always scan for them. */ | 87 /* Keypad keys are a little trickier, we always scan for them. |
88 for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) { | 88 Keypad arrow keys have the same scancode as normal arrow keys, |
89 if (scancode == keypad_scancodes[i]) { | 89 except they don't have the extended bit (0x1000000) set. |
90 wParam = VK_NUMPAD0 + i; | 90 */ |
91 break; | 91 if (!(lParam & 0x1000000)) { |
92 for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) { | |
93 if (scancode == keypad_scancodes[i]) { | |
94 wParam = VK_NUMPAD0 + i; | |
95 break; | |
96 } | |
92 } | 97 } |
93 } | 98 } |
94 | 99 |
95 return wParam; | 100 return wParam; |
96 } | 101 } |