diff src/video/windx5/SDL_dx5video.c @ 1472:4aac8563c296

Fixed more Win64 portability issues
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Mar 2006 08:11:10 +0000
parents d910939febfa
children 0a2bd6507477
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5video.c	Mon Mar 06 07:42:36 2006 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Mon Mar 06 08:11:10 2006 +0000
@@ -1123,7 +1123,7 @@
 		}
 #endif /* !NO_CHANGEDISPLAYSETTINGS */
 
-		style = GetWindowLong(SDL_Window, GWL_STYLE);
+		style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
 		style &= ~(resizestyle|WS_MAXIMIZE);
 		if ( video->flags & SDL_FULLSCREEN ) {
 			style &= ~windowstyle;
@@ -1148,7 +1148,7 @@
 
 		/* DJM: Don't piss of anyone who has setup his own window */
 		if ( !SDL_windowid )
-			SetWindowLong(SDL_Window, GWL_STYLE, style);
+			SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
 
 		/* Resize the window (copied from SDL WinDIB driver) */
 		if ( !SDL_windowid && !IsZoomed(SDL_Window) ) {
@@ -1178,7 +1178,7 @@
 			bounds.top = SDL_windowY;
 			bounds.right = SDL_windowX+video->w;
 			bounds.bottom = SDL_windowY+video->h;
-			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+			AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
 			width = bounds.right-bounds.left;
 			height = bounds.bottom-bounds.top;
 			if ( (flags & SDL_FULLSCREEN) ) {
@@ -1217,7 +1217,7 @@
 	}
 
 	/* Set the appropriate window style */
-	style = GetWindowLong(SDL_Window, GWL_STYLE);
+	style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
 	style &= ~(resizestyle|WS_MAXIMIZE);
 	if ( (flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
 		style &= ~windowstyle;
@@ -1239,7 +1239,7 @@
 	}
 	/* DJM: Don't piss of anyone who has setup his own window */
 	if ( !SDL_windowid )
-		SetWindowLong(SDL_Window, GWL_STYLE, style);
+		SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
 
 	/* Set DirectDraw sharing mode.. exclusive when fullscreen */
 	if ( (flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
@@ -1264,7 +1264,7 @@
 		bounds.top = 0;
 		bounds.right = GetSystemMetrics(SM_CXSCREEN);
 		bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
-		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+		AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
 		SetWindowPos(SDL_Window, HWND_TOPMOST,
 			bounds.left, bounds.top, 
 			bounds.right - bounds.left,
@@ -1581,7 +1581,7 @@
 			bounds.top = SDL_windowY;
 			bounds.right = SDL_windowX+video->w;
 			bounds.bottom = SDL_windowY+video->h;
-			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+			AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
 			width = bounds.right-bounds.left;
 			height = bounds.bottom-bounds.top;
 			if ( center ) {