Commit b71e95fc2c030428c768de20332f9d857b9aed41
1 parent
04a3b84c
win32 patch (kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@829 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
9 additions
and
13 deletions
sdl.c
... | ... | @@ -87,20 +87,20 @@ static const uint32_t x_keycode_to_pc_keycode[61] = { |
87 | 87 | 0x0, /* 117 */ |
88 | 88 | 0x0, /* 118 */ |
89 | 89 | 0x0, /* 119 */ |
90 | - 0x0, /* 120 */ | |
90 | + 0x70, /* 120 Hiragana_Katakana */ | |
91 | 91 | 0x0, /* 121 */ |
92 | 92 | 0x0, /* 122 */ |
93 | - 0x0, /* 123 */ | |
93 | + 0x73, /* 123 backslash */ | |
94 | 94 | 0x0, /* 124 */ |
95 | 95 | 0x0, /* 125 */ |
96 | 96 | 0x0, /* 126 */ |
97 | 97 | 0x0, /* 127 */ |
98 | 98 | 0x0, /* 128 */ |
99 | - 0x0, /* 129 */ | |
99 | + 0x79, /* 129 Henkan */ | |
100 | 100 | 0x0, /* 130 */ |
101 | - 0x0, /* 131 */ | |
101 | + 0x7b, /* 131 Muhenkan */ | |
102 | 102 | 0x0, /* 132 */ |
103 | - 0x0, /* 133 */ | |
103 | + 0x7d, /* 133 Yen */ | |
104 | 104 | 0x0, /* 134 */ |
105 | 105 | 0x0, /* 135 */ |
106 | 106 | 0x47, /* 136 KP_7 */ |
... | ... | @@ -133,23 +133,19 @@ static void sdl_process_key(SDL_KeyboardEvent *ev) |
133 | 133 | |
134 | 134 | /* XXX: not portable, but avoids complicated mappings */ |
135 | 135 | keycode = ev->keysym.scancode; |
136 | -#ifdef _WIN32 | |
137 | - if (keycode < 97) { | |
138 | - /* nothing to do */ | |
139 | - } else | |
140 | -#else | |
136 | + | |
137 | +#ifndef _WIN32 | |
141 | 138 | if (keycode < 9) { |
142 | 139 | keycode = 0; |
143 | 140 | } else if (keycode < 97) { |
144 | 141 | keycode -= 8; /* just an offset */ |
145 | - } else | |
146 | -#endif | |
147 | - if (keycode < 158) { | |
142 | + } else if (keycode < 158) { | |
148 | 143 | /* use conversion table */ |
149 | 144 | keycode = x_keycode_to_pc_keycode[keycode - 97]; |
150 | 145 | } else { |
151 | 146 | keycode = 0; |
152 | 147 | } |
148 | +#endif | |
153 | 149 | |
154 | 150 | /* now send the key code */ |
155 | 151 | while (keycode != 0) { | ... | ... |