History

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.

Martin Storsjö committed 12 years ago

Commit 05bf57a1 parent cc2ffee1 file · +6 −0Browse files

Showing the changes to codec/processing/src/common (1 of 1 file). Show all

Unified · Split

codec/processing/src/common/thread.cpp+6−0
@@ -43,6 +43,12 @@ WELSVP_NAMESPACE_BEGIN · 42 unmodified lines
4343
4444 #if defined(_WIN32)
4545
46+#ifdef WINAPI_FAMILY
47+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
48+#define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0)
49+#endif
50+#endif
51+
4652 WELS_THREAD_ERROR_CODE WelsMutexInit (WELS_MUTEX* mutex) {
4753 InitializeCriticalSection (mutex);
4854

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t