Browse code

dxva2/d3d11va: Set _WIN32_WINNT to 0x0602 instead of 0x0600

If _WIN32_WINNT is unset, we force it to a new enough value to
make sure the necessary definitions are visible.

When targeting Windows Phone or Windows RT, _WIN32_WINNT should
be at least 0x0602 - otherwise the windows headers themselves
can cause errors (which technically are bugs in the headers).

Raising this value here shouldn't hurt; the alternative would
be to not touch it at all if WINAPI_FAMILY is set to phone/app,
or to force setting it to 0x0602 in configure if unset (for phone/app).

Signed-off-by: Martin Storsjö <martin@martin.st>

Martin Storsjö authored on 2015/07/26 02:30:31
Showing 3 changed files
... ...
@@ -4280,7 +4280,7 @@ check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
4280 4280
 
4281 4281
 check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
4282 4282
 check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
4283
-check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0600
4283
+check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
4284 4284
 
4285 4285
 if ! disabled w32threads && ! enabled pthreads; then
4286 4286
     check_func_headers "windows.h process.h" _beginthreadex &&
... ...
@@ -30,9 +30,9 @@
30 30
  * Public libavcodec D3D11VA header.
31 31
  */
32 32
 
33
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
33
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
34 34
 #undef _WIN32_WINNT
35
-#define _WIN32_WINNT 0x0600
35
+#define _WIN32_WINNT 0x0602
36 36
 #endif
37 37
 
38 38
 #include <stdint.h>
... ...
@@ -29,9 +29,9 @@
29 29
  * Public libavcodec DXVA2 header.
30 30
  */
31 31
 
32
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
32
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
33 33
 #undef _WIN32_WINNT
34
-#define _WIN32_WINNT 0x0600
34
+#define _WIN32_WINNT 0x0602
35 35
 #endif
36 36
 
37 37
 #include <stdint.h>