diff src/video/x11/SDL_x11modes.c @ 2963:ee331407574f

Don't use DirectColor visuals until we implement DirectColor colormap support
author Sam Lantinga <slouken@libsdl.org>
date Fri, 02 Jan 2009 15:47:49 +0000
parents 2c01dc6218cc
children 4b594623401b
line wrap: on
line diff
--- a/src/video/x11/SDL_x11modes.c	Fri Jan 02 10:30:53 2009 +0000
+++ b/src/video/x11/SDL_x11modes.c	Fri Jan 02 15:47:49 2009 +0000
@@ -32,9 +32,6 @@
 get_visualinfo(Display * display, int screen, XVisualInfo * vinfo)
 {
     const char *visual_id = SDL_getenv("SDL_VIDEO_X11_VISUALID");
-    /* We really don't need DirectColor visuals until we implement
-     * gamma ramps, but we'll leave it on for now to catch bugs */
-    int use_directcolor = 0;
     int depth;
 
     /* Look for an exact visual, if requested */
@@ -53,7 +50,7 @@
     }
 
     depth = DefaultDepth(display, screen);
-    if ((use_directcolor &&
+    if ((X11_UseDirectColorVisuals() &&
          XMatchVisualInfo(display, screen, depth, DirectColor, vinfo)) ||
         XMatchVisualInfo(display, screen, depth, TrueColor, vinfo) ||
         XMatchVisualInfo(display, screen, depth, PseudoColor, vinfo) ||