Fix video_getSetWindowPosition() that fail when checking events,

because testautomation_events.c() didn't finish to poll all events before
This commit is contained in:
Sylvain authored and Sylvain Becker committed 2023-03-24 09:52:05 +01:00
1 parent 5976b79c1c
commit 3ccfd361cb
1 file changed
+4
+4
View File
@@ -66,6 +66,10 @@ static int events_pushPumpAndPollUserevent(void *arg)
SDLTest_AssertPass("Call to SDL_PollEvent()");
SDLTest_AssertCheck(result == 1, "Check result from SDL_PollEvent, expected: 1, got: %d", result);
/* Need to finish getting all events and sentinel, otherwise other tests that rely on event are in bad state */
while (SDL_PollEvent(&event2)) {
}
return TEST_COMPLETED;
}