[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.92,1.93

Jindrich Makovicka CVS henry at mplayerhq.hu
Sat Nov 2 19:56:36 CET 2002


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

Modified Files:
	vo_sdl.c 
Log Message:
fix for fs modes on widescreen displays

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- vo_sdl.c	9 Oct 2002 23:54:13 -0000	1.92
+++ vo_sdl.c	2 Nov 2002 18:56:16 -0000	1.93
@@ -700,15 +700,24 @@
 		screen_surface_h = priv->XHeight;
 	}
 	else if (mode < 0) {
-        int i;
+        int i,j,imax;
 		mode = 0; // Default to the biggest mode avaible
+		if (verbose) for(i=0;priv->fullmodes[i];++i) 
+	           printf("SDL Mode: %d:  %d x %d\n", i, priv->fullmodes[i]->w, priv->fullmodes[i]->h);
 		for(i = findArrayEnd(priv->fullmodes) - 1; i >=0; i--) {
 		  if( (priv->fullmodes[i]->w >= priv->dstwidth) && 
 		      (priv->fullmodes[i]->h >= priv->dstheight) ) {
-		    mode = i;
-		    break;
+		      imax = i;
+		      for (j = findArrayEnd(priv->fullmodes) - 1; j >=0; j--) {
+			  if (priv->fullmodes[j]->w > priv->fullmodes[imax]->w
+			      && priv->fullmodes[j]->h == priv->fullmodes[imax]->h)
+			      imax = j;
+		      }
+		      mode = imax;
+		      break;
+		    }
 		  }
-		}
+		if (verbose) printf("SET SDL Mode: %d:  %d x %d\n", mode, priv->fullmodes[mode]->w, priv->fullmodes[mode]->h);
 		priv->fullmode = mode;
         screen_surface_h = priv->fullmodes[mode]->h;
         screen_surface_w = priv->fullmodes[mode]->w;




More information about the MPlayer-cvslog mailing list