[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.55,1.56

Atmosfear atmos4 at mplayer.dev.hu
Wed Oct 10 03:03:59 CEST 2001


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

Modified Files:
	vo_sdl.c 
Log Message:
Make double/normal (n-key) use aspect()


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- vo_sdl.c	4 Oct 2001 11:42:21 -0000	1.55
+++ vo_sdl.c	10 Oct 2001 01:03:54 -0000	1.56
@@ -1084,14 +1084,16 @@
 				}
 
 				else if ( keypressed == SDLK_n ) {
-					if (priv->surface->w != priv->width || priv->surface->h != priv->height) {
-						priv->surface = SDL_SetVideoMode(priv->width, priv->height, priv->bpp, priv->sdlflags);
+					int newwidth = priv->dstwidth, newheight = priv->dstheight;
+					aspect(&newwidth, &newheight, priv->dstwidth, (int)((float)priv->dstwidth*((float)priv->XHeight / (float)priv->XWidth)));
+					if (priv->surface->w != newwidth || priv->surface->h != newheight) {
+						priv->surface = SDL_SetVideoMode(newwidth, newheight, priv->bpp, priv->sdlflags);
 					    	priv->windowsize.w = priv->surface->w;
 						priv->windowsize.h = priv->surface->h;
 						if(verbose > 1) printf("SDL: Normal size\n");
 					} else
-					if (priv->surface->w != priv->width * 2 || priv->surface->h != priv->height * 2) {
-						priv->surface = SDL_SetVideoMode(priv->width * 2, priv->height * 2, priv->bpp, priv->sdlflags);
+					if (priv->surface->w != newwidth * 2 || priv->surface->h != newheight * 2) {
+						priv->surface = SDL_SetVideoMode(newwidth * 2, newheight * 2, priv->bpp, priv->sdlflags);
 					    	priv->windowsize.w = priv->surface->w;
 						priv->windowsize.h = priv->surface->h;
 						if(verbose > 1) printf("SDL: Double size\n");




More information about the MPlayer-cvslog mailing list