From cd2162f9c40f4950c19ac98f0e920ddb98929612 Mon Sep 17 00:00:00 2001 From: get-charlie Date: Thu, 6 Aug 2026 15:07:37 +0200 Subject: [PATCH] Fix Android relaunch hang after destroy while paused When the activity is destroyed while the app is paused, PollInputEvents kept looping after setting CORE.Window.shouldClose: while paused, ALooper_pollAll is called with an infinite timeout (-1), so on the next iteration it blocked forever waiting for an event that never arrives. main() never returned, the native thread stayed alive, and the following launch hung inheriting that thread. --- src/platforms/rcore_android.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index d7eed9c4363a..2851658107ac 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -801,6 +801,7 @@ void PollInputEvents(void) if (platform.app->destroyRequested != 0) { CORE.Window.shouldClose = true; + break; } } }