Fixed remapping the Delete key and detecting the keypad Delete key.

This commit is contained in:
Sam Lantinga 2010-07-20 23:59:16 -07:00
parent 0e59ffc802
commit 3a9c617ff8
2 changed files with 9 additions and 6 deletions

View file

@ -83,10 +83,14 @@ RemapVKEY(WPARAM wParam, LPARAM lParam)
except they don't have the extended bit (0x1000000) set.
*/
if (!(lParam & 0x1000000)) {
for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
if (scancode == keypad_scancodes[i]) {
wParam = VK_NUMPAD0 + i;
break;
if (wParam == VK_DELETE) {
wParam = VK_DECIMAL;
} else {
for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
if (scancode == keypad_scancodes[i]) {
wParam = VK_NUMPAD0 + i;
break;
}
}
}
}