changeset 34609:a8497c26c9f1

Remove code that has been unused and disabled since a very long time.
author reimar
date Sun, 12 Feb 2012 18:39:27 +0000
parents a8fa53bd66e0
children 4ff933a89818
files libvo/vo_sdl.c
diffstat 1 files changed, 0 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_sdl.c	Sun Feb 12 17:29:27 2012 +0000
+++ b/libvo/vo_sdl.c	Sun Feb 12 18:39:27 2012 +0000
@@ -485,81 +485,6 @@
 	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)
 {