From 5bfe3b063afd275ee7a7b4e164c910c6e8f0f496 Mon Sep 17 00:00:00 2001 From: Nickolas McDonald <43690021+n77y@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:15:00 -0400 Subject: [PATCH] Update rcore.c --- src/rcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index ddd32de4c..d2e743cc3 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -6067,9 +6067,10 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = keycode; CORE.Input.Keyboard.keyPressedQueueCount++; } - else if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_MULTIPLE) CORE.Input.Keyboard.repeatKeyState[keycode] = 1; else CORE.Input.Keyboard.currentKeyState[keycode] = 0; // Key up + if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_MULTIPLE) CORE.Input.Keyboard.repeatKeyState[keycode] = 1; + if (keycode == AKEYCODE_POWER) { // Let the OS handle input to avoid app stuck. Behaviour: CMD_PAUSE -> CMD_SAVE_STATE -> CMD_STOP -> CMD_CONFIG_CHANGED -> CMD_LOST_FOCUS