Skip to content

Commit

Permalink
Fix IsKeyPressedRepeat() for PLATFORM_DRM direct input (raysan5#3583)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubkp authored Nov 30, 2023
1 parent e7a486f commit bd81bdc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platforms/rcore_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,7 @@ static void PollKeyboardEvents(void)
// Event interface: 'value' is the value the event carries. Either a relative change for EV_REL,
// absolute new value for EV_ABS (joysticks ...), or 0 for EV_KEY for release, 1 for keypress and 2 for autorepeat
CORE.Input.Keyboard.currentKeyState[keycode] = (event.value >= 1)? 1 : 0;
CORE.Input.Keyboard.keyRepeatInFrame[keycode] = (event.value == 2)? 1 : 0;
if (event.value >= 1)
{
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = keycode; // Register last key pressed
Expand Down

0 comments on commit bd81bdc

Please sign in to comment.