mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed try_lock on windows
This commit is contained in:
parent
f7f7e8e99a
commit
3a0b017619
|
@ -477,7 +477,7 @@ int lock_try(LOCK lock)
|
||||||
#if defined(CONF_FAMILY_UNIX)
|
#if defined(CONF_FAMILY_UNIX)
|
||||||
return pthread_mutex_trylock((LOCKINTERNAL *)lock);
|
return pthread_mutex_trylock((LOCKINTERNAL *)lock);
|
||||||
#elif defined(CONF_FAMILY_WINDOWS)
|
#elif defined(CONF_FAMILY_WINDOWS)
|
||||||
return TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
||||||
#else
|
#else
|
||||||
#error not implemented on this platform
|
#error not implemented on this platform
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue