Use InitializeCriticalSectionEx for Windows Store or Windows Phone apps
The old InitializeCriticalSection function isn't available in these API partitions, and the new InitializeCriticalSectionEx function is only available since Vista, so we want to keep using the old function for normal desktop code.
This commit is contained in:
parent
cc2ffee5d2
commit
05bf57a2af
@ -43,6 +43,12 @@ WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#ifdef WINAPI_FAMILY
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
WELS_THREAD_ERROR_CODE WelsMutexInit (WELS_MUTEX* mutex) {
|
||||
InitializeCriticalSection (mutex);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user