mirror of
https://github.com/encounter/SDL.git
synced 2025-06-16 11:33:39 +00:00
switch: fix wrong keyboard keys events
This commit is contained in:
parent
177b651fe6
commit
a10e1c5b40
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user