1
0
mirror of https://github.com/libretro/RetroArch synced 2025-03-01 16:13:40 +00:00

Merge pull request from dylanscott20/master

(Emscripten) Fix input code to ignore unknown keys
This commit is contained in:
Autechre 2020-07-14 10:19:01 +02:00 committed by GitHub
commit a76274a884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -636,10 +636,12 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput,
else if (translated_keycode == RETROK_TAB)
character = '\t';
input_keyboard_event(keydown, translated_keycode, character, mod,
RETRO_DEVICE_KEYBOARD);
if (translated_keycode < RETROK_LAST)
if (translated_keycode != RETROK_UNKNOWN) {
input_keyboard_event(keydown, translated_keycode, character, mod,
RETRO_DEVICE_KEYBOARD);
}
if (translated_keycode < RETROK_LAST && translated_keycode != RETROK_UNKNOWN)
{
rwebinput->keys[translated_keycode] = keydown;
}