mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 12:14:41 +02:00
update SDL3 to 3.4.10.
This commit is contained in:
@@ -230,6 +230,7 @@ static int SDLCALL IncrementCounterThread(void *userdata)
|
||||
SDL_Event event;
|
||||
|
||||
SDL_assert(!SDL_IsMainThread());
|
||||
SDL_zero(event);
|
||||
|
||||
if (data->delay > 0) {
|
||||
SDL_Delay(data->delay);
|
||||
@@ -286,6 +287,9 @@ static int SDLCALL events_mainThreadCallbacks(void *arg)
|
||||
SDL_WaitThread(thread, NULL);
|
||||
SDLTest_AssertCheck(data.counter == 3, "Incremented counter on main thread, expected 3, got %d", data.counter);
|
||||
|
||||
/* Flush events again, as the previous SDL_WaitEvent() call may have pumped OS events and added them to the queue */
|
||||
SDL_FlushEvents(SDL_EVENT_FIRST, SDL_EVENT_LAST);
|
||||
|
||||
/* Try again, but this time delay the calls until we've started waiting for events */
|
||||
data.delay = 100;
|
||||
thread = SDL_CreateThread(IncrementCounterThread, NULL, &data);
|
||||
|
||||
Reference in New Issue
Block a user