Fix Android relaunch hang after destroy while paused (#6040)

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.
This commit is contained in:
Carlos Serrano
2026-08-07 18:37:57 +02:00
committed by GitHub
parent a55d49b754
commit 7ee0b08647

View File

@@ -801,6 +801,7 @@ void PollInputEvents(void)
if (platform.app->destroyRequested != 0)
{
CORE.Window.shouldClose = true;
break;
}
}
}