[Mplayer-cvslog] CVS: main/libvo vo_dga.c,1.3,1.4

Michael Graffam mgraffam at users.sourceforge.net
Wed Mar 28 21:58:47 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv2495/libvo

Modified Files:
	vo_dga.c 
Log Message:
Changes to configure to autodetect DGA 2.0 functionality, and to only use
DGA video mode switching when DGA 2.0 is present


Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vo_dga.c	2001/03/27 04:29:22	1.3
--- vo_dga.c	2001/03/28 19:58:45	1.4
***************
*** 242,249 ****
    int x_off, y_off;
  
  // needed to change DGA video mode
!   int modecount,mX, mY, X, Y, i,j;
    XDGAMode *modelines=NULL;
    XDGADevice *dgadevice;
  
    if( vo_dga_is_running )return -1;
--- 242,252 ----
    int x_off, y_off;
  
+ #ifdef HAVE_DGA2
  // needed to change DGA video mode
!   int modecount,mX, mY, i,j;
!   int X,Y;
    XDGAMode *modelines=NULL;
    XDGADevice *dgadevice;
+ #endif
  
    if( vo_dga_is_running )return -1;
***************
*** 260,263 ****
--- 263,267 ----
    } 
  
+ #ifdef HAVE_DGA2
  // Code to change the video mode added by Michael Graffam
  // mgraffam at idsi.net
***************
*** 286,289 ****
--- 290,294 ----
    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);  
  
***************
*** 294,306 ****
    XFree(modelines);
    XFree(dgadevice);
  
- // end mode change code
- 
-   XF86DGAGetVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 
-                   (char **)&vo_dga_base, &vo_dga_width, &bank, &ram);
- 
-   vo_dga_vp_width=modelines[j].viewportWidth;
-   vo_dga_vp_height=modelines[j].viewportHeight;
-   
    // do some more checkings here ...
    if( format==IMGFMT_YV12 ) 
--- 299,318 ----
    XFree(modelines);
    XFree(dgadevice);
+   // end mode change code
+ #else
+ printf("vo_dga: DGA 1.0 compatibility code\n");
+ #endif
+ 
+ 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);
+ 
+ #ifndef HAVE_DGA2
+ XF86DGASetViewPort (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0, 0);
+ #endif
  
    // do some more checkings here ...
    if( format==IMGFMT_YV12 ) 


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list