diff src/video/ps2gs/SDL_gsyuv.c @ 136:717f739d6ec1

Added hardware stretching code to scale 640x480 to TV resolution There's a bug of some kind in the 16bpp code. ??
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Aug 2001 08:41:45 +0000
parents f590dd383b5d
children e8157fcb3114
line wrap: on
line diff
--- a/src/video/ps2gs/SDL_gsyuv.c	Wed Aug 01 05:01:08 2001 +0000
+++ b/src/video/ps2gs/SDL_gsyuv.c	Wed Aug 01 08:41:45 2001 +0000
@@ -223,7 +223,7 @@
 	fbp = screen_image.fbp;
 	fbw = screen_image.fbw;
 	psm = screen_image.psm;
-	y = screen_image.h;	/* Offscreen video memory */
+	y = screen_image.y + screen_image.h;	/* Offscreen video memory */
 	for ( h=height/16; h; --h ) {
 		x = 0;			/* Visible video memory */
 		for ( w=width/16; w; --w ) {
@@ -273,7 +273,7 @@
 	tex_packet.len = 8 * sizeof(*tags);
 	tags[0] = 3 | (1LL << 60);	/* GIFtag */
 	tags[1] = 0x0e;			/* A+D */
-	tags[2] = (screen_image.h * screen_image.w) / 64 +
+	tags[2] = ((screen_image.y + screen_image.h) * screen_image.w) / 64 +
 	          ((unsigned long long)fbw << 14) +
 	          ((unsigned long long)psm << 20) +
 	          ((unsigned long long)power_of_2(width) << 26) +
@@ -437,6 +437,7 @@
 		     screen->format->BytesPerPixel;
 		y += (screen->offset / screen->pitch);
 	}
+	y += screen_image.y;
 	*hwdata->stretch_x1y1 = (x * 16) + ((y * 16) << 16);
 	x += (unsigned int)dstrect->w;
 	y += (unsigned int)dstrect->h;