SDL: mutex: Fixed bug where generic SDL_TryLockMutex would incorrectly block.

From ace0c2c29742b5e641c33523acc45b0cc1d3891c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 25 Oct 2023 13:02:50 -0400
Subject: [PATCH] mutex: Fixed bug where generic SDL_TryLockMutex would
 incorrectly block.

Fixes #8433.
---
 src/thread/generic/SDL_sysmutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/generic/SDL_sysmutex.c b/src/thread/generic/SDL_sysmutex.c
index a735db973d3e..8d4a3702d1eb 100644
--- a/src/thread/generic/SDL_sysmutex.c
+++ b/src/thread/generic/SDL_sysmutex.c
@@ -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;