[vlc-commits] directdraw: link to dxguid and remove GUID definition

Zhao Zhili git at videolan.org
Thu Jul 12 12:10:38 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu Jul 12 17:28:45 2018 +0800| [77934be8840c2380c6fd30be350c70a92773c8cb] | committer: Hugo Beauzée-Luyssen

directdraw: link to dxguid and remove GUID definition

Fix static build error:

plugins/libmft_plugin.a(mft.o):mft.c:(.rdata$IID_IDirectDrawSurface2[_IID_IDirectDrawSurface2]+0x0): multiple definition of `IID_IDirectDrawSurface2'
plugins/libdirectdraw_plugin.a(libdirectdraw_plugin_la-directdraw.o):directdraw.c:(.rdata+0xe9c): first defined here IID_IDirectDraw2

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77934be8840c2380c6fd30be350c70a92773c8cb
---

 modules/video_output/Makefile.am        |  2 +-
 modules/video_output/win32/directdraw.c | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 3013e3fd1d..8dab932b30 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -311,7 +311,7 @@ libdirectdraw_plugin_la_SOURCES = video_output/win32/directdraw.c \
 	video_output/win32/win32touch.c video_output/win32/win32touch.h
 libdirectdraw_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_directdraw
-libdirectdraw_plugin_la_LIBADD = libchroma_copy.la -luser32 -lgdi32 $(LIBCOM) -luuid
+libdirectdraw_plugin_la_LIBADD = libchroma_copy.la -luser32 -ldxguid -lgdi32 $(LIBCOM) -luuid
 libdirectdraw_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
 if HAVE_WIN32_DESKTOP
 vout_LTLIBRARIES += $(LTLIBdirectdraw)
diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
index 0af3ba03f9..121c0563e9 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -163,17 +163,6 @@ struct vout_display_sys_t
     bool           wallpaper_requested;
 };
 
-/*****************************************************************************
- * DirectDraw GUIDs.
- * Defining them here allows us to get rid of the dxguid library during
- * the linking stage.
- *****************************************************************************/
-#include <initguid.h>
-#undef GUID_EXT
-#define GUID_EXT
-DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56);
-DEFINE_GUID(IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27);
-
 static picture_pool_t *Pool  (vout_display_t *, unsigned);
 static void           Display(vout_display_t *, picture_t *, subpicture_t *);
 static int            Control(vout_display_t *, int, va_list);



More information about the vlc-commits mailing list