mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-05 13:10:47 +00:00
Main callbacks should be processed even if events are already pending in SDL_WaitEvent()
Fixes https://github.com/libsdl-org/SDL/issues/15485
(cherry picked from commit 757400e044)
This commit is contained in:
@@ -1726,6 +1726,10 @@ bool SDL_WaitEventTimeoutNS(SDL_Event *event, Sint64 timeoutNS)
|
||||
}
|
||||
} else {
|
||||
// Has existing events
|
||||
if (!event) {
|
||||
// The application expects callbacks to run even if events are pending
|
||||
SDL_RunMainThreadCallbacks();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// We should have completely handled timeoutNS == 0 above
|
||||
|
||||
Reference in New Issue
Block a user