From a10e1c5b400b61a35155f5f510f01474b50b6f25 Mon Sep 17 00:00:00 2001 From: cpasjuste Date: Thu, 24 Jun 2021 13:42:55 +0200 Subject: [PATCH] switch: fix wrong keyboard keys events --- src/video/switch/SDL_switchkeyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/switch/SDL_switchkeyboard.c b/src/video/switch/SDL_switchkeyboard.c index e24e70545..5037f6ff4 100644 --- a/src/video/switch/SDL_switchkeyboard.c +++ b/src/video/switch/SDL_switchkeyboard.c @@ -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);