[vlc-commits] DirectDraw: DirectDrawEnumerateExW does not work, use DirectDrawEnumerateExA instead.
Felix Abecassis
git at videolan.org
Mon Jan 20 16:44:38 CET 2014
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Mon Jan 20 16:30:14 2014 +0100| [77c6cbf165d9f460e22674c8738d75d84e8a0fc3] | committer: Jean-Baptiste Kempf
DirectDraw: DirectDrawEnumerateExW does not work, use DirectDrawEnumerateExA instead.
Fix #10189, #10307.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77c6cbf165d9f460e22674c8738d75d84e8a0fc3
---
modules/video_output/msw/directx.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index cb48b73..603c247 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -57,7 +57,7 @@
#endif
#ifdef UNICODE
-# define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExW"
+# define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExA"
#else
# define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExA"
#endif
@@ -453,8 +453,8 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
if (!hmon)
return TRUE;
- char *psz_drivername = FromT(drivername);
- char *psz_desc = FromT(desc);
+ char *psz_drivername = (char*)drivername;
+ char *psz_desc = (char*)desc;
msg_Dbg(vd, "DirectXEnumCallback: %s, %s", psz_desc, psz_drivername);
@@ -493,8 +493,6 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
*sys->display_driver = *guid;
}
- free(psz_drivername);
- free(psz_desc);
return TRUE;
}
/**
@@ -1420,7 +1418,7 @@ static BOOL WINAPI DirectXEnumCallback2(GUID *guid, LPTSTR desc,
VLC_UNUSED(guid); VLC_UNUSED(desc); VLC_UNUSED(hmon);
- char *psz_drivername = FromT(drivername);
+ char *psz_drivername = (char*)(drivername);
ctx->values = xrealloc(ctx->values, (ctx->count + 1) * sizeof(char *));
ctx->descs = xrealloc(ctx->descs, (ctx->count + 1) * sizeof(char *));
@@ -1428,7 +1426,6 @@ static BOOL WINAPI DirectXEnumCallback2(GUID *guid, LPTSTR desc,
ctx->descs[ctx->count] = strdup(psz_drivername);
ctx->count++;
- free(psz_drivername);
return TRUE; /* Keep enumerating */
}
More information about the vlc-commits
mailing list