diff src/video/SDL_surface.c @ 1456:84de7511f79f

Fixed a bunch of 64-bit compatibility problems
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Mar 2006 09:43:47 +0000
parents 5f52867ba65c
children 782fd950bd46 c121d94672cb a1b03ba2fcd0
line wrap: on
line diff
--- a/src/video/SDL_surface.c	Mon Feb 27 22:14:40 2006 +0000
+++ b/src/video/SDL_surface.c	Wed Mar 01 09:43:47 2006 +0000
@@ -604,7 +604,7 @@
 			dstrect->x*dst->format->BytesPerPixel;
 	if ( dst->format->palette || (color == 0) ) {
 		x = dstrect->w*dst->format->BytesPerPixel;
-		if ( !color && !((long)row&3) && !(x&3) && !(dst->pitch&3) ) {
+		if ( !color && !((uintptr_t)row&3) && !(x&3) && !(dst->pitch&3) ) {
 			int n = x >> 2;
 			for ( y=dstrect->h; y; --y ) {
 				SDL_memset4(row, 0, n);
@@ -690,7 +690,7 @@
 				Uint16 c = (Uint16)color;
 				Uint32 cc = (Uint32)c << 16 | c;
 				int n = dstrect->w;
-				if((unsigned long)pixels & 3) {
+				if((uintptr_t)pixels & 3) {
 					*pixels++ = c;
 					n--;
 				}