From d6bccd80f724670c4c17ebf1615f440158ea12db Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 22 Jan 2016 22:43:51 -0800 Subject: [PATCH] Util: Fix MutexTryLock on Windows --- src/platform/windows/threading.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/windows/threading.h b/src/platform/windows/threading.h index 37427bf23..efcf3a091 100644 --- a/src/platform/windows/threading.h +++ b/src/platform/windows/threading.h @@ -34,7 +34,7 @@ static inline int MutexLock(Mutex* mutex) { static inline int MutexTryLock(Mutex* mutex) { if (TryEnterCriticalSection(mutex)) { - return GetLastError(); + return 0; } return 1; }