mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38: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)
|
||||
return pthread_mutex_trylock((LOCKINTERNAL *)lock);
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
return TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
||||
return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
||||
#else
|
||||
#error not implemented on this platform
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue