summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-01-25 10:34:06 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-01-25 08:41:11 +0100
commited56e79b5373a3fb7dbabc5b56eaae2ac898ce05 (patch)
tree28c1d5a8383d498fc38a4371090fad2d734f28d6 /src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
parent3de9bc9cb1dc96ea803e6190de9b6fb6fe00e307 (diff)
[HarfBuzz-NG] Fix build on WinRT
This adopts c26d5cf6ef50ea102cfb18eb2109f60bcdfdafb6 and moves some code around. Change-Id: Icbc1f4e0cfa6c6b994c3e5096cf1cc66bc0b32f9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
index 6281201958..a8ea39ccfd 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
@@ -47,7 +47,11 @@
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT {0}
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0)
+#else
#define hb_mutex_impl_init(M) InitializeCriticalSection (M)
+#endif
#define hb_mutex_impl_lock(M) EnterCriticalSection (M)
#define hb_mutex_impl_unlock(M) LeaveCriticalSection (M)
#define hb_mutex_impl_finish(M) DeleteCriticalSection (M)