#include <assert.h>
#include <aalib.h>
+#ifndef WIN32
+# ifdef X_DISPLAY_MISSING
+# error Xlib required due to XInitThreads
+# endif
+# include <vlc_xlib.h>
+#endif
+
/* TODO
* - what about RGB palette ?
*/
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)