mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(Emscripten) Fix input code to ignore unknown keys
This commit is contained in:
parent
3297e464c4
commit
b4ac13cc5a
@ -636,10 +636,12 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput,
|
|||||||
else if (translated_keycode == RETROK_TAB)
|
else if (translated_keycode == RETROK_TAB)
|
||||||
character = '\t';
|
character = '\t';
|
||||||
|
|
||||||
input_keyboard_event(keydown, translated_keycode, character, mod,
|
if (translated_keycode != RETROK_UNKNOWN) {
|
||||||
RETRO_DEVICE_KEYBOARD);
|
input_keyboard_event(keydown, translated_keycode, character, mod,
|
||||||
|
RETRO_DEVICE_KEYBOARD);
|
||||||
if (translated_keycode < RETROK_LAST)
|
}
|
||||||
|
|
||||||
|
if (translated_keycode < RETROK_LAST && translated_keycode != RETROK_UNKNOWN)
|
||||||
{
|
{
|
||||||
rwebinput->keys[translated_keycode] = keydown;
|
rwebinput->keys[translated_keycode] = keydown;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user