Removed timeout in SDL_RunOnMainThread()

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

(cherry picked from commit 8abcc27535)
This commit is contained in:
Sam Lantinga committed 2025-04-29 08:58:54 -07:00
1 parent a29c67ac94
commit b2b92bbe25
1 file changed
+1 -3
+1 -3
View File
@@ -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: