From c55e00fe59408dcfb461313336c49e3ae5805df0 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 12 Nov 2005 15:30:46 +0000 Subject: [PATCH] * src/caca.c: on Unix, do not use the GL driver if DISPLAY is not set. --- src/caca.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/caca.c b/src/caca.c index 13afa46..e8ba95e 100644 --- a/src/caca.c +++ b/src/caca.c @@ -533,8 +533,13 @@ static void caca_init_driver(void) } #endif #if defined(USE_GL) - _caca_driver = CACA_DRIVER_GL; - return; +#if defined(HAVE_GETENV) && defined(GLUT_XLIB_IMPLEMENTATION) + if(getenv("DISPLAY") && *(getenv("DISPLAY"))) +#endif + { + _caca_driver = CACA_DRIVER_GL; + return; + } #endif #if defined(USE_SLANG) _caca_driver = CACA_DRIVER_SLANG;