Fixed bug #14233 - Android fix Android_WaitActiveAndLockActivity() to make sure Android_Paused state is refreshed

(cherry picked from commit e4c60c05bf)
This commit is contained in:
Sylvain authored and Sam Lantinga committed 2025-10-19 07:44:15 -07:00
1 parent 5a9050aea3
commit 92570af7d3
1 file changed
+6
+6
View File
@@ -248,6 +248,12 @@ void Android_PumpEvents(Sint64 timeoutNS)
bool Android_WaitActiveAndLockActivity(void)
{
/* Make sure we have pumped all events so that Android_Paused state is correct */
SDL_AndroidLifecycleEvent event;
while (!Android_Destroyed && Android_WaitLifecycleEvent(&event, 0)) {
Android_HandleLifecycleEvent(event);
}
while (Android_Paused && !Android_Destroyed) {
Android_PumpEvents(-1);
}