shithub: openh264

Download patch

ref: 65fa5d2a37b089daed47cb625dbefbd981fea9b0
parent: 05bf57a2af593ff8d946b8619262ece147ab5fa9
author: Martin Storsjö <[email protected]>
date: Fri Dec 27 19:08:18 EST 2013

Enable use of D3D9 only when targeting desktop apps

Don't try to build this when building for phone/windows store (aka
metro/winrt) apps - this API isn't available there.

--- a/codec/console/dec/inc/d3d9_utils.h
+++ b/codec/console/dec/inc/d3d9_utils.h
@@ -47,7 +47,14 @@
 #include "codec_def.h"
 
 #if defined(_MSC_VER) && (_MSC_VER>=1500) // vs2008 and upper
+#ifdef WINAPI_FAMILY
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 #define ENABLE_DISPLAY_MODULE // enable/disable the render feature
+#endif
+#else /* defined(WINAPI_FAMILY) */
+#define ENABLE_DISPLAY_MODULE // enable/disable the render feature
+#endif
 #endif
 
 #ifdef ENABLE_DISPLAY_MODULE