Browse Source

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>
tags/n2.8
Martin Storsjö 10 years ago
parent
commit
d75b55635a
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      configure
  2. +2
    -2
      libavcodec/d3d11va.h
  3. +2
    -2
      libavcodec/dxva2.h

+ 1
- 1
configure View File

@@ -4280,7 +4280,7 @@ check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss


check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
check_type "windows.h d3d11.h" "ID3D11VideoDecoder" check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0600
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602


if ! disabled w32threads && ! enabled pthreads; then if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex && check_func_headers "windows.h process.h" _beginthreadex &&


+ 2
- 2
libavcodec/d3d11va.h View File

@@ -30,9 +30,9 @@
* Public libavcodec D3D11VA header. * Public libavcodec D3D11VA header.
*/ */


#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
#undef _WIN32_WINNT #undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#define _WIN32_WINNT 0x0602
#endif #endif


#include <stdint.h> #include <stdint.h>


+ 2
- 2
libavcodec/dxva2.h View File

@@ -29,9 +29,9 @@
* Public libavcodec DXVA2 header. * Public libavcodec DXVA2 header.
*/ */


#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
#undef _WIN32_WINNT #undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#define _WIN32_WINNT 0x0602
#endif #endif


#include <stdint.h> #include <stdint.h>


Loading…
Cancel
Save