From d6d738ce6ec022d25c2dda2c12d9c194092230f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 15 Jul 2010 19:26:43 +0300 Subject: [PATCH] ASCII Art: initialize Xlib Don't ask me why, but libaa depends on Xlib. --- configure.ac | 3 +++ modules/video_output/aa.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index 7eace73e9e..4dbf6e238b 100644 --- a/configure.ac +++ b/configure.ac @@ -3623,6 +3623,9 @@ then then VLC_ADD_PLUGIN([aa]) VLC_ADD_LIBS([aa],[-laa]) + if test "${SYS}" != "mingw32"; then + VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11]) + fi fi fi diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c index 5c446284ec..7c9fb21bbc 100644 --- a/modules/video_output/aa.c +++ b/modules/video_output/aa.c @@ -36,6 +36,13 @@ #include #include +#ifndef WIN32 +# ifdef X_DISPLAY_MISSING +# error Xlib required due to XInitThreads +# endif +# include +#endif + /* TODO * - what about RGB palette ? */ @@ -83,6 +90,11 @@ static int Open(vlc_object_t *object) vout_display_t *vd = (vout_display_t *)object; vout_display_sys_t *sys; +#ifndef WIN32 + if (!vlc_xlib_init (object)) + return VLC_EGENERIC; +#endif + /* Allocate structure */ vd->sys = sys = calloc(1, sizeof(*sys)); if (!sys) -- 2.39.2