Browse Source

Removed timeout in SDL_RunOnMainThread()

Fixes https://github.com/libsdl-org/SDL/issues/12923

(cherry picked from commit 8abcc275357ff99ab81db1e3b4a55702f2d0f84e)
Sam Lantinga 3 months ago
parent
commit
b2b92bbe25
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/events/SDL_events.c

+ 1 - 3
src/events/SDL_events.c

@@ -1379,9 +1379,7 @@ bool SDL_RunOnMainThread(SDL_MainThreadCallback callback, void *userdata, bool w
         return true;
     }
 
-    // Maximum wait of 30 seconds to prevent deadlocking forever
-    const Sint32 MAX_CALLBACK_WAIT = 30 * 1000;
-    SDL_WaitSemaphoreTimeout(entry->semaphore, MAX_CALLBACK_WAIT);
+    SDL_WaitSemaphore(entry->semaphore);
 
     switch (SDL_GetAtomicInt(&entry->state)) {
     case SDL_MAIN_CALLBACK_COMPLETE: