# HG changeset patch # User acki2 # Date 987199868 0 # Node ID 01768a027e7d5f1fb9050c366474ddd2955033e3 # Parent f4fb35ef4c06bacb395dd10c4ffb94a44ba27487 - fixed bug with depth and mpg when current bpp of XServer was != 32 - when -bpp is selected, I accept only query_modes() for THIS particular depth (if it's supported by hardware) diff -r f4fb35ef4c06 -r 01768a027e7d libvo/vo_dga.c --- a/libvo/vo_dga.c Fri Apr 13 21:04:13 2001 +0000 +++ b/libvo/vo_dga.c Fri Apr 13 22:11:08 2001 +0000 @@ -23,11 +23,10 @@ * - works only on x86 architectures * * $Log$ - * Revision 1.11 2001/04/13 18:49:59 acki2 - * - completely rewrote depth switching - * - support for -bpp - * (needs at least mplayer.c 1.53 and cfg-mplayer.h 1.18 and latest stuff from - * libvo to work) + * Revision 1.12 2001/04/13 22:11:08 acki2 + * - fixed bug with depth and mpg when current bpp of XServer was != 32 + * - when -bpp is selected, I accept only query_modes() for THIS particular depth + * (if it's supported by hardware) * * Revision 1.10 2001/04/01 22:01:28 acki2 * - still more debug output to be able to fix 15/16 bpp problem @@ -154,6 +153,18 @@ } +int vd_ValidateMode( int mplayer_depth){ + int i; + if(mplayer_depth == 0)return 0; + for(i=1; ired_mask, - DefaultVisual(qdisp, DefaultScreen(qdisp))->green_mask, - DefaultVisual(qdisp, DefaultScreen(qdisp))->blue_mask); + if( !vo_init() ){ + vd_printf(VD_ERR, "vo_dga: vo_init() failed!\n"); + return 1; + } + vo_dga_XServer_mode = vd_ValidateMode(vo_depthonscreen); + if(vo_dga_XServer_mode ==0){ #ifndef HAVE_DGA2 vd_printf(VD_ERR, "vo_dga: Your X-Server is not running in a "); @@ -388,7 +399,7 @@ modelines[i].redMask, modelines[i].greenMask, modelines[i].blueMask, - modelines[i].viewportWidth, + modelines[i].viewportWidth, modelines[i].viewportHeight); vd_EnableMode( modelines[i].depth, @@ -406,7 +417,12 @@ for(i=0; i