dxva2: Clean up definition of _WIN32_WINNT

Only set a value if _WIN32_WINNT is undefined or smaller than 0x0600. This is
cleaner than unconditional definition and avoids a number of redefinition
warnings. Also only define a value in one of the two dxva2 headers.
pull/88/head
Diego Biurrun 11 years ago
parent 4600a85eaa
commit b8962d64cc
  1. 4
      libavcodec/dxva2.h
  2. 1
      libavcodec/dxva2_internal.h

@ -29,7 +29,11 @@
* Public libavcodec DXVA2 header. * Public libavcodec DXVA2 header.
*/ */
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600 #define _WIN32_WINNT 0x0600
#endif
#include <stdint.h> #include <stdint.h>
#include <d3d9.h> #include <d3d9.h>
#include <dxva2api.h> #include <dxva2api.h>

@ -23,7 +23,6 @@
#ifndef AVCODEC_DXVA_INTERNAL_H #ifndef AVCODEC_DXVA_INTERNAL_H
#define AVCODEC_DXVA_INTERNAL_H #define AVCODEC_DXVA_INTERNAL_H
#define _WIN32_WINNT 0x0600
#define COBJMACROS #define COBJMACROS
#include "config.h" #include "config.h"

Loading…
Cancel
Save