Skip to content

Commit 464f413

Browse files
committed
keyboard: default last_release to false
1 parent 7f05d56 commit 464f413

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/events/SDL_keyboard.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static bool SDL_SendKeyboardKeyInternal(Uint64 timestamp, Uint32 flags, SDL_Keyb
528528
SDL_Keycode keycode = SDLK_UNKNOWN;
529529
Uint32 type;
530530
bool repeat = false;
531-
bool last_release = true;
531+
bool last_release = false;
532532
const Uint8 source = flags & KEYBOARD_SOURCE_MASK;
533533

534534
#ifdef DEBUG_KEYBOARD
@@ -564,8 +564,6 @@ static bool SDL_SendKeyboardKeyInternal(Uint64 timestamp, Uint32 flags, SDL_Keyb
564564
if (keyboard->keyrefcount[scancode] == 0) {
565565
keyboard->keysource[scancode] = 0;
566566
last_release = true;
567-
} else {
568-
last_release = false;
569567
}
570568
}
571569

0 commit comments

Comments
 (0)