[MPlayer-cvslog] r34697 - trunk/libvo/vo_sdl.c
reimar
subversion at mplayerhq.hu
Sun Feb 12 19:39:28 CET 2012
Author: reimar
Date: Sun Feb 12 19:39:27 2012
New Revision: 34697
Log:
Remove code that has been unused and disabled since a very long time.
Modified:
trunk/libvo/vo_sdl.c
Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c Sun Feb 12 18:29:27 2012 (r34696)
+++ trunk/libvo/vo_sdl.c Sun Feb 12 19:39:27 2012 (r34697)
@@ -485,81 +485,6 @@ static int sdl_close (void)
return 0;
}
-/**
- * Do aspect ratio calculations
- *
- * params : srcw == sourcewidth
- * srch == sourceheight
- * dstw == destinationwidth
- * dsth == destinationheight
- *
- * returns : SDL_Rect structure with new x and y, w and h
- **/
-
-#if 0
-static SDL_Rect aspect(int srcw, int srch, int dstw, int dsth) {
- SDL_Rect newres;
- mp_msg(MSGT_VO,MSGL_V, "SDL Aspect-Destinationres: %ix%i (x: %i, y: %i)\n", newres.w, newres.h, newres.x, newres.y);
- newres.h = ((float)dstw / (float)srcw * (float)srch) * ((float)dsth/((float)dstw/(MONITOR_ASPECT)));
- if(newres.h > dsth) {
- newres.w = ((float)dsth / (float)newres.h) * dstw;
- newres.h = dsth;
- newres.x = (dstw - newres.w) / 2;
- newres.y = 0;
- }
- else {
- newres.w = dstw;
- newres.x = 0;
- newres.y = (dsth - newres.h) / 2;
- }
-
- mp_msg(MSGT_VO,MSGL_V, "SDL Mode: %d: %d x %d\n", i, priv->fullmodes[i]->w, priv->fullmodes[i]->h);
-
- return newres;
-}
-#endif
-
-/**
- * Sets the specified fullscreen mode.
- *
- * params : mode == index of the desired fullscreen mode
- * returns : doesn't return
- **/
-
-#if 0
-static void set_fullmode (int mode)
-{
- struct sdl_priv_s *priv = &sdl_priv;
- SDL_Surface *newsurface = NULL;
- int haspect, waspect = 0;
-
- /* if we haven't set a fullmode yet, default to the lowest res fullmode first */
- if (mode < 0)
- mode = priv->fullmode = findArrayEnd(priv->fullmodes) - 1;
-
- /* Calculate proper aspect ratio for fullscreen
- * Height smaller than expected: add horizontal black bars (haspect)*/
- haspect = (priv->width * (float) ((float) priv->fullmodes[mode]->h / (float) priv->fullmodes[mode]->w) - priv->height) * (float) ((float) priv->fullmodes[mode]->w / (float) priv->width);
- /* Height bigger than expected: add vertical black bars (waspect)*/
- if (haspect < 0) {
- haspect = 0; /* set haspect to zero because image will be scaled horizontal instead of vertical */
- waspect = priv->fullmodes[mode]->w - ((float) ((float) priv->fullmodes[mode]->h / (float) priv->height) * (float) priv->width);
- }
-// printf ("W-Aspect: %i H-Aspect: %i\n", waspect, haspect);
-
- /* change to given fullscreen mode and hide the mouse cursor */
- newsurface = SDL_SetVideoMode(priv->fullmodes[mode]->w - waspect, priv->fullmodes[mode]->h - haspect, priv->bpp, priv->sdlfullflags);
-
- /* if we were successful hide the mouse cursor and save the mode */
- if (newsurface) {
- if (priv->surface)
- SDL_FreeSurface(priv->surface);
- priv->surface = newsurface;
- SDL_ShowCursor(0);
- }
-}
-#endif
-
/* Set video mode. Not fullscreen */
static void set_video_mode(int width, int height, int bpp, uint32_t sdlflags)
{
More information about the MPlayer-cvslog
mailing list