From 5b1f23375f7de45e331ab4645ef978b9c0630937 Mon Sep 17 00:00:00 2001 From: Nickolas McDonald <43690021+n77y@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:32:02 -0400 Subject: [PATCH] Update rcore.c --- src/rcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index 0198fe9ac..efa7f75cd 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -5172,7 +5172,7 @@ void SwapScreenBuffer(void) static void RegisterCurrentKeyState(int key, bool state) { if (state && (CORE.Input.Keyboard.currentKeyState[key] < MAX_KEY_REPEAT)) CORE.Input.Keyboard.currentKeyState[key]++; - else CORE.Input.Keyboard.currentKeyState[key] = 0; + else if (!state) CORE.Input.Keyboard.currentKeyState[key] = 0; } // Register previous keys states and remove unused key repeats