diff options
author | mgraffam <mgraffam@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-28 19:58:45 +0000 |
---|---|---|
committer | mgraffam <mgraffam@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-28 19:58:45 +0000 |
commit | effaab2cf269cde8fca13b82db3c3c81ca10c609 (patch) | |
tree | da6f5a6db2e9a3c89314d6488b856d189a0113ef /libvo | |
parent | 4680a1cbed5baa03f40ba79f97a41747c6c988b5 (diff) | |
download | mpv-effaab2cf269cde8fca13b82db3c3c81ca10c609.tar.bz2 mpv-effaab2cf269cde8fca13b82db3c3c81ca10c609.tar.xz |
Changes to configure to autodetect DGA 2.0 functionality, and to only use
DGA video mode switching when DGA 2.0 is present
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@234 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_dga.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c index c7aa9e8ecb..e1fa382f78 100644 --- a/libvo/vo_dga.c +++ b/libvo/vo_dga.c @@ -241,10 +241,13 @@ static uint32_t init( uint32_t width, uint32_t height, int bank, ram; int x_off, y_off; +#ifdef HAVE_DGA2 // needed to change DGA video mode - int modecount,mX, mY, X, Y, i,j; + int modecount,mX, mY, i,j; + int X,Y; XDGAMode *modelines=NULL; XDGADevice *dgadevice; +#endif if( vo_dga_is_running )return -1; @@ -259,6 +262,7 @@ static uint32_t init( uint32_t width, uint32_t height, return 1; } +#ifdef HAVE_DGA2 // Code to change the video mode added by Michael Graffam // mgraffam@idsi.net if (modelines==NULL) @@ -285,6 +289,7 @@ static uint32_t init( uint32_t width, uint32_t height, } X=(modelines[j].imageWidth-mX)/2; Y=(modelines[j].imageHeight-mY)/2; + printf("vo_dga: Using DGA 2.0 mode changing support\n"); printf("vo_dga: Selected video mode %dx%d for image size %dx%d.\n", mX, mY,width, height); XF86DGASetViewPort (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), X,Y); @@ -293,15 +298,22 @@ static uint32_t init( uint32_t width, uint32_t height, XFree(modelines); XFree(dgadevice); + // end mode change code +#else +printf("vo_dga: DGA 1.0 compatibility code\n"); +#endif -// end mode change code +XF86DGAGetViewPortSize(vo_dga_dpy,XDefaultScreen(vo_dga_dpy), + &vo_dga_vp_width, + &vo_dga_vp_height); - XF86DGAGetVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), - (char **)&vo_dga_base, &vo_dga_width, &bank, &ram); +XF86DGAGetVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), + (char **)&vo_dga_base, &vo_dga_width, &bank, &ram); + +#ifndef HAVE_DGA2 +XF86DGASetViewPort (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0, 0); +#endif - vo_dga_vp_width=modelines[j].viewportWidth; - vo_dga_vp_height=modelines[j].viewportHeight; - // do some more checkings here ... if( format==IMGFMT_YV12 ) yuv2rgb_init( vo_depthonscreen, MODE_RGB ); |