[Mplayer-cvslog] CVS: main/libvo geometry.c,1.8,1.9 vo_xvidix.c,1.58,1.59

Attila Kinali CVS attila at mplayerhq.hu
Sun Apr 20 17:09:47 CEST 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv17202

Modified Files:
	geometry.c vo_xvidix.c 
Log Message:
adding geometry support for xvidix
fixing some 10l in geometry.c


Index: geometry.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/geometry.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- geometry.c	2 Mar 2003 21:09:14 -0000	1.8
+++ geometry.c	20 Apr 2003 15:09:19 -0000	1.9
@@ -60,17 +60,23 @@
 	       }
 
 		mp_msg(MSGT_VO, MSGL_V,"geometry set to width: %i,"
-		  "height: %i, xoff: %i, yoff: %i, xper: %1, yper: %i\n",
+		  "height: %i, xoff: %i, yoff: %i, xper: %i, yper: %i\n",
 		  width, height, xoff, yoff, xper, yper);
 		  
 		if(xper >= 0 && xper <= 100) xoff = (scrw - *widw) * ((float)xper / 100.0);
 		if(yper >= 0 && yper <= 100) yoff = (scrh - *widh) * ((float)yper / 100.0);
 
+		mp_msg(MSGT_VO, MSGL_V,"geometry set to width: %i,"
+		  "height: %i, xoff: %i, yoff: %i, xper: %i, yper: %i\n",
+		  width, height, xoff, yoff, xper, yper);
+		mp_msg(MSGT_VO, MSGL_V,"geometry window parameter: widw: %i,"
+		  " widh: %i, scrw: %i, scrh: %i\n",*widw, *widh, scrw, scrh);
+		  
 		/* FIXME: better checking of bounds... */
-		if(width < 0 || width > scrw) width = *widw;
-		if(height < 0 || height > scrh) height = *widh;
-		if(xoff < 0 || xoff + *widw > scrw) xoff = 0;
-		if(yoff < 0 || yoff + *widh > scrh) yoff = 0;
+		if(width < 0 || width > scrw) width = (scrw < *widw) ? scrw : *widw;
+		if(height < 0 || height > scrh) height = (scrh < *widh) ? scrh : *widh;
+		if(xoff < 0 || xoff + width > scrw) xoff = 0;
+		if(yoff < 0 || yoff + height > scrh) yoff = 0;
 
 		if(xpos) *xpos = xoff;
 		if(ypos) *ypos = yoff;

Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- vo_xvidix.c	18 Jan 2003 15:05:06 -0000	1.58
+++ vo_xvidix.c	20 Apr 2003 15:09:19 -0000	1.59
@@ -238,6 +238,8 @@
 
     vo_dx = 0;
     vo_dy = 0;
+    vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;    
+    geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
     window_width = d_width;
     window_height = d_height;
 
@@ -266,7 +268,6 @@
 
     aspect(&d_width, &d_height, A_NOZOOM);
 
-    vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;    
     vo_dwidth=d_width; vo_dheight=d_height;
 
 #ifdef HAVE_NEW_GUI



More information about the MPlayer-cvslog mailing list