summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-07 21:33:14 +0100
committerwm4 <wm4@nowhere>2015-01-07 21:42:44 +0100
commitf61b8b312d251f9c8dd33d03d1566fd73019bf08 (patch)
treea75dbd7b94e403be08ec09c72fbd74178096d315 /video
parent5f398831d2aac9f65bc3499101f529fa51eebdf7 (diff)
downloadmpv-f61b8b312d251f9c8dd33d03d1566fd73019bf08.tar.bz2
mpv-f61b8b312d251f9c8dd33d03d1566fd73019bf08.tar.xz
win32: request UTF-16 API variants, Vista+ APIs, and COM C macros
Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code.
Diffstat (limited to 'video')
-rw-r--r--video/decode/dxva2.c9
-rw-r--r--video/filter/vf_dlopen.c2
-rw-r--r--video/out/gl_w32.c2
-rw-r--r--video/out/w32_common.c2
4 files changed, 4 insertions, 11 deletions
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c
index 405ad293b4..cbd08a7e52 100644
--- a/video/decode/dxva2.c
+++ b/video/decode/dxva2.c
@@ -21,12 +21,7 @@
#include <windows.h>
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-#define _WIN32_WINNT 0x0600
#define DXVA2API_USE_BITFIELDS
-#define COBJMACROS
#include <stdint.h>
@@ -360,12 +355,12 @@ static int dxva2_init(struct lavc_ctx *s)
ctx->deviceHandle = INVALID_HANDLE_VALUE;
- ctx->d3dlib = LoadLibrary("d3d9.dll");
+ ctx->d3dlib = LoadLibrary(L"d3d9.dll");
if (!ctx->d3dlib) {
MP_ERR(ctx, "Failed to load D3D9 library\n");
goto fail;
}
- ctx->dxva2lib = LoadLibrary("dxva2.dll");
+ ctx->dxva2lib = LoadLibrary(L"dxva2.dll");
if (!ctx->dxva2lib) {
MP_ERR(ctx, "Failed to load DXVA2 library\n");
goto fail;
diff --git a/video/filter/vf_dlopen.c b/video/filter/vf_dlopen.c
index 7e546df32f..00e6245a2e 100644
--- a/video/filter/vf_dlopen.c
+++ b/video/filter/vf_dlopen.c
@@ -34,7 +34,7 @@
#ifdef _WIN32
# include <windows.h>
-# define DLLOpen(name) LoadLibrary(name)
+# define DLLOpen(name) LoadLibraryA(name)
# define DLLClose(handle) FreeLibrary(handle)
# define DLLSymbol(handle, name) ((void *)GetProcAddress(handle, name))
#else
diff --git a/video/out/gl_w32.c b/video/out/gl_w32.c
index 79e3165b39..abdea60775 100644
--- a/video/out/gl_w32.c
+++ b/video/out/gl_w32.c
@@ -81,7 +81,7 @@ static void *w32gpa(const GLubyte *procName)
void *res = wglGetProcAddress(procName);
if (res)
return res;
- oglmod = GetModuleHandle("opengl32.dll");
+ oglmod = GetModuleHandle(L"opengl32.dll");
return GetProcAddress(oglmod, procName);
}
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 672c61150e..bcfe0dbff0 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -16,8 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define COBJMACROS
-#define _WIN32_WINNT 0x0600
#include <stdio.h>
#include <limits.h>
#include <pthread.h>