Mercurial > mplayer.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
7255:34b5a0b12558 | 7256:ec6dd0a29d93 |
---|---|
270 //printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight ); | 270 //printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight ); |
271 | 271 |
272 XGetWindowAttributes( mDisplay,mRootWin,&attribs ); | 272 XGetWindowAttributes( mDisplay,mRootWin,&attribs ); |
273 depth=attribs.depth; | 273 depth=attribs.depth; |
274 | 274 |
275 if ( depth != 8 && depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24; | 275 if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) { |
276 Visual *visual; | |
277 depth = vo_find_depth_from_visuals(mDisplay, mScreen, &visual); | |
278 } | |
276 XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo ); | 279 XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo ); |
277 | 280 |
278 /* set image size (which is indeed neither the input nor output size), | 281 /* set image size (which is indeed neither the input nor output size), |
279 if zoom is on it will be changed during draw_slice anyway so we dont dupplicate the aspect code here | 282 if zoom is on it will be changed during draw_slice anyway so we dont dupplicate the aspect code here |
280 */ | 283 */ |