switch: fix wrong keyboard keys events

This commit is contained in:
cpasjuste 2021-06-24 13:42:55 +02:00
parent 177b651fe6
commit a10e1c5b40
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ SWITCH_PollKeyboard(void) {
}
if (hidGetKeyboardStates(&state, 1)) {
for (scancode = SDL_SCANCODE_UNKNOWN; scancode < SDL_NUM_SCANCODES; scancode++) {
for (scancode = SDL_SCANCODE_UNKNOWN; scancode < (SDL_Scancode) HidKeyboardKey_RightGui; scancode++) {
bool pressed = hidKeyboardStateGetKey(&state, (int) scancode);
if (pressed && !keys[scancode]) {
SDL_SendKeyboardKey(pressed, scancode);