mirror of https://github.com/encounter/SDL.git
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…
Reference in New Issue