diff libvo/vo_x11.c @ 7256:ec6dd0a29d93

Add the code that chooses a good X11 truecolor visual to the vo_x11 config() function. This is useful for framebuffers on Sun hardware, where we have multiple truecolor visuals of different depths available, and the root window typically runs at depth 8, yet there are 24 bit true color visuals available as well.
author jkeil
date Tue, 03 Sep 2002 18:10:42 +0000
parents eca7dbad0166
children 56ea9db91251
line wrap: on
line diff
--- a/libvo/vo_x11.c	Tue Sep 03 17:15:08 2002 +0000
+++ b/libvo/vo_x11.c	Tue Sep 03 18:10:42 2002 +0000
@@ -272,7 +272,10 @@
  XGetWindowAttributes( mDisplay,mRootWin,&attribs );
  depth=attribs.depth;
 
- if ( depth != 8 && depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24;
+ if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) {
+   Visual *visual;
+   depth = vo_find_depth_from_visuals(mDisplay, mScreen, &visual);
+ }
  XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo );
 
  /* set image size (which is indeed neither the input nor output size),