summaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-06 19:30:16 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-06 19:30:16 +0000
commitaaba6c1516ce3babd09e2324c7c7571332bb150c (patch)
treee05145c98ab6175b0f050272f0bed58beba6261f /sdl.c
parent38e205a25b8f34916a4d3fdb7aef7424745fdd5a (diff)
win32: correct keycode remapping
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@710 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index f2dcfbc783..f283d86cd2 100644
--- a/sdl.c
+++ b/sdl.c
@@ -127,11 +127,18 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
/* XXX: not portable, but avoids complicated mappings */
keycode = ev->keysym.scancode;
+#ifdef _WIN32
+ if (keycode < 97) {
+ /* nothing to do */
+ } else
+#else
if (keycode < 9) {
keycode = 0;
} else if (keycode < 97) {
keycode -= 8; /* just an offset */
- } else if (keycode < 158) {
+ } else
+#endif
+ if (keycode < 158) {
/* use conversion table */
keycode = x_keycode_to_pc_keycode[keycode - 97];
} else {