mutex: Fixed bug where generic SDL_TryLockMutex would incorrectly block.

Fixes #8433.
This commit is contained in:
Ryan C. Gordon committed 2023-10-25 13:03:46 -04:00
1 parent f52b330ed8
commit ace0c2c297
1 file changed
+1 -1
+1 -1
View File
@@ -118,7 +118,7 @@ int SDL_TryLockMutex(SDL_Mutex *mutex)
We set the locking thread id after we obtain the lock
so unlocks from other threads will fail.
*/
retval = SDL_WaitSemaphore(mutex->sem);
retval = SDL_TryWaitSemaphore(mutex->sem);
if (retval == 0) {
mutex->owner = this_thread;
mutex->recursive = 0;