diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-10 01:03:54 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-10 01:03:54 +0000 |
commit | 25f38b560e61311e8956ad53e59f395d8e27153e (patch) | |
tree | b11a9b098c4030b2c383652b2b781042482fbd4c | |
parent | 9f85e062849271a2d9f1567947c24a65de5b2ca3 (diff) |
Make double/normal (n-key) use aspect()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2148 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/vo_sdl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 61415f8481..8e1e45510d 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -1084,14 +1084,16 @@ static void check_events (void) } 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"); |