src/video/x11/SDL_x11modes.c
changeset 5466 006883d5fa51
parent 5408 35a63789c3f2
child 5481 22dfc3958dc3
--- a/src/video/x11/SDL_x11modes.c	Thu Mar 10 01:03:43 2011 -0800
+++ b/src/video/x11/SDL_x11modes.c	Fri Mar 11 08:49:20 2011 -0800
@@ -47,7 +47,9 @@
     }
 
     depth = DefaultDepth(display, screen);
-    if (XMatchVisualInfo(display, screen, depth, TrueColor, vinfo) ||
+    if ((X11_UseDirectColorVisuals() &&
+         XMatchVisualInfo(display, screen, depth, DirectColor, vinfo)) ||
+        XMatchVisualInfo(display, screen, depth, TrueColor, vinfo) ||
         XMatchVisualInfo(display, screen, depth, PseudoColor, vinfo) ||
         XMatchVisualInfo(display, screen, depth, StaticColor, vinfo)) {
         return 0;