mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 10:17:54 +00:00
Fixed SDL_RunOnMainThread() on Android
If the application is waiting in SDL_WaitEvent(), we still need to run event loop maintenance in between calls to Android_PumpEvents().
Fixes the testautomation events_mainThreadCallbacks() test on Android.
(cherry picked from commit bae34c3e34)
This commit is contained in:
parent
6cb55ebd46
commit
936d94c2ee
1 changed files with 2 additions and 0 deletions
|
|
@ -1646,6 +1646,8 @@ bool SDL_WaitEventTimeoutNS(SDL_Event *event, Sint64 timeoutNS)
|
|||
|
||||
#ifdef SDL_PLATFORM_ANDROID
|
||||
for (;;) {
|
||||
SDL_PumpEventsInternal(true);
|
||||
|
||||
if (SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST) > 0) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue