More Win64 updates
authorSam Lantinga <slouken@libsdl.org>
Tue, 07 Mar 2006 05:21:32 +0000
changeset 14800a2bd6507477
parent 1479 993ef9ff4688
child 1481 deb22b9fe970
More Win64 updates
include/SDL_config_win32.h
src/timer/win32/SDL_systimer.c
src/video/gapi/SDL_gapivideo.c
src/video/wincommon/SDL_sysevents.c
src/video/wincommon/SDL_wingl.c
src/video/windib/SDL_dibevents.c
src/video/windib/SDL_dibvideo.c
src/video/windx5/SDL_dx5video.c
     1.1 --- a/include/SDL_config_win32.h	Tue Mar 07 04:58:30 2006 +0000
     1.2 +++ b/include/SDL_config_win32.h	Tue Mar 07 05:21:32 2006 +0000
     1.3 @@ -150,7 +150,9 @@
     1.4  #define SDL_VIDEO_OPENGL_WGL	1
     1.5  #endif
     1.6  
     1.7 -/* Enable assembly routines */
     1.8 +/* Enable assembly routines (Win64 doesn't have inline asm) */
     1.9 +#ifndef _WIN64
    1.10  #define SDL_ASSEMBLY_ROUTINES	1
    1.11 +#endif
    1.12  
    1.13  #endif /* _SDL_config_win32_h */
     2.1 --- a/src/timer/win32/SDL_systimer.c	Tue Mar 07 04:58:30 2006 +0000
     2.2 +++ b/src/timer/win32/SDL_systimer.c	Tue Mar 07 05:21:32 2006 +0000
     2.3 @@ -128,7 +128,7 @@
     2.4  /* Forward declaration because this is called by the timer callback */
     2.5  int SDL_SYS_StartTimer(void);
     2.6  
     2.7 -static VOID CALLBACK TimerCallbackProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
     2.8 +static VOID CALLBACK TimerCallbackProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
     2.9  {
    2.10  	Uint32 ms;
    2.11  
    2.12 @@ -170,8 +170,8 @@
    2.13  /* Data to handle a single periodic alarm */
    2.14  static UINT timerID = 0;
    2.15  
    2.16 -static void CALLBACK HandleAlarm(UINT uID,  UINT uMsg, DWORD dwUser,
    2.17 -						DWORD dw1, DWORD dw2)
    2.18 +static void CALLBACK HandleAlarm(UINT uID,  UINT uMsg, DWORD_PTR dwUser,
    2.19 +						DWORD_PTR dw1, DWORD_PTR dw2)
    2.20  {
    2.21  	SDL_ThreadedTimerCheck();
    2.22  }
     3.1 --- a/src/video/gapi/SDL_gapivideo.c	Tue Mar 07 04:58:30 2006 +0000
     3.2 +++ b/src/video/gapi/SDL_gapivideo.c	Tue Mar 07 05:21:32 2006 +0000
     3.3 @@ -710,7 +710,7 @@
     3.4  	style = 0;
     3.5  
     3.6  	if (!SDL_windowid)
     3.7 -		SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
     3.8 +		SetWindowLong(SDL_Window, GWL_STYLE, style);
     3.9  
    3.10  	/* Allocate bitmap */
    3.11  	if(gapiBuffer) 
     4.1 --- a/src/video/wincommon/SDL_sysevents.c	Tue Mar 07 04:58:30 2006 +0000
     4.2 +++ b/src/video/wincommon/SDL_sysevents.c	Tue Mar 07 05:21:32 2006 +0000
     4.3 @@ -562,7 +562,7 @@
     4.4  			   Aparently it's too difficult for MS to check
     4.5  			   inside their function, so I have to do it here.
     4.6            		 */
     4.7 -         		style = GetWindowLongPtr(hwnd, GWL_STYLE);
     4.8 +         		style = GetWindowLong(hwnd, GWL_STYLE);
     4.9           		AdjustWindowRect(
    4.10  				&size,
    4.11  				style,
     5.1 --- a/src/video/wincommon/SDL_wingl.c	Tue Mar 07 04:58:30 2006 +0000
     5.2 +++ b/src/video/wincommon/SDL_wingl.c	Tue Mar 07 05:21:32 2006 +0000
     5.3 @@ -45,7 +45,7 @@
     5.4  		/* Save the existing window attributes */
     5.5  		LONG style;
     5.6  		RECT rect = { 0, 0, 0, 0 };
     5.7 -		style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
     5.8 +		style = GetWindowLong(SDL_Window, GWL_STYLE);
     5.9  		GetWindowRect(SDL_Window, &rect);
    5.10  		DestroyWindow(SDL_Window);
    5.11  		SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
     6.1 --- a/src/video/windib/SDL_dibevents.c	Tue Mar 07 04:58:30 2006 +0000
     6.2 +++ b/src/video/windib/SDL_dibevents.c	Tue Mar 07 05:21:32 2006 +0000
     6.3 @@ -392,7 +392,7 @@
     6.4  		Uint16	wchars[2];
     6.5  
     6.6  		GetKeyboardState(keystate);
     6.7 -		if (SDL_ToUnicode(vkey, scancode, keystate, wchars, sizeof(wchars)/sizeof(wchars[0]), 0) == 1)
     6.8 +		if (SDL_ToUnicode((UINT)vkey, scancode, keystate, wchars, sizeof(wchars)/sizeof(wchars[0]), 0) == 1)
     6.9  		{
    6.10  			keysym->unicode = wchars[0];
    6.11  		}
     7.1 --- a/src/video/windib/SDL_dibvideo.c	Tue Mar 07 04:58:30 2006 +0000
     7.2 +++ b/src/video/windib/SDL_dibvideo.c	Tue Mar 07 05:21:32 2006 +0000
     7.3 @@ -647,7 +647,7 @@
     7.4  		screen_pal = DIB_CreatePalette(bpp);
     7.5  	}
     7.6  
     7.7 -	style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
     7.8 +	style = GetWindowLong(SDL_Window, GWL_STYLE);
     7.9  	style &= ~(resizestyle|WS_MAXIMIZE);
    7.10  	if ( (video->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
    7.11  		style &= ~windowstyle;
    7.12 @@ -677,7 +677,7 @@
    7.13  
    7.14  	/* DJM: Don't piss of anyone who has setup his own window */
    7.15  	if ( !SDL_windowid )
    7.16 -		SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
    7.17 +		SetWindowLong(SDL_Window, GWL_STYLE, style);
    7.18  
    7.19  	/* Delete the old bitmap if necessary */
    7.20  	if ( screen_bmp != NULL ) {
    7.21 @@ -780,7 +780,7 @@
    7.22  		bounds.top = SDL_windowY;
    7.23  		bounds.right = SDL_windowX+video->w;
    7.24  		bounds.bottom = SDL_windowY+video->h;
    7.25 -		AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
    7.26 +		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    7.27  		width = bounds.right-bounds.left;
    7.28  		height = bounds.bottom-bounds.top;
    7.29  		if ( (flags & SDL_FULLSCREEN) ) {
     8.1 --- a/src/video/windx5/SDL_dx5video.c	Tue Mar 07 04:58:30 2006 +0000
     8.2 +++ b/src/video/windx5/SDL_dx5video.c	Tue Mar 07 05:21:32 2006 +0000
     8.3 @@ -1123,7 +1123,7 @@
     8.4  		}
     8.5  #endif /* !NO_CHANGEDISPLAYSETTINGS */
     8.6  
     8.7 -		style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
     8.8 +		style = GetWindowLong(SDL_Window, GWL_STYLE);
     8.9  		style &= ~(resizestyle|WS_MAXIMIZE);
    8.10  		if ( video->flags & SDL_FULLSCREEN ) {
    8.11  			style &= ~windowstyle;
    8.12 @@ -1148,7 +1148,7 @@
    8.13  
    8.14  		/* DJM: Don't piss of anyone who has setup his own window */
    8.15  		if ( !SDL_windowid )
    8.16 -			SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
    8.17 +			SetWindowLong(SDL_Window, GWL_STYLE, style);
    8.18  
    8.19  		/* Resize the window (copied from SDL WinDIB driver) */
    8.20  		if ( !SDL_windowid && !IsZoomed(SDL_Window) ) {
    8.21 @@ -1178,7 +1178,7 @@
    8.22  			bounds.top = SDL_windowY;
    8.23  			bounds.right = SDL_windowX+video->w;
    8.24  			bounds.bottom = SDL_windowY+video->h;
    8.25 -			AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
    8.26 +			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    8.27  			width = bounds.right-bounds.left;
    8.28  			height = bounds.bottom-bounds.top;
    8.29  			if ( (flags & SDL_FULLSCREEN) ) {
    8.30 @@ -1217,7 +1217,7 @@
    8.31  	}
    8.32  
    8.33  	/* Set the appropriate window style */
    8.34 -	style = GetWindowLongPtr(SDL_Window, GWL_STYLE);
    8.35 +	style = GetWindowLong(SDL_Window, GWL_STYLE);
    8.36  	style &= ~(resizestyle|WS_MAXIMIZE);
    8.37  	if ( (flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
    8.38  		style &= ~windowstyle;
    8.39 @@ -1239,7 +1239,7 @@
    8.40  	}
    8.41  	/* DJM: Don't piss of anyone who has setup his own window */
    8.42  	if ( !SDL_windowid )
    8.43 -		SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
    8.44 +		SetWindowLong(SDL_Window, GWL_STYLE, style);
    8.45  
    8.46  	/* Set DirectDraw sharing mode.. exclusive when fullscreen */
    8.47  	if ( (flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
    8.48 @@ -1264,7 +1264,7 @@
    8.49  		bounds.top = 0;
    8.50  		bounds.right = GetSystemMetrics(SM_CXSCREEN);
    8.51  		bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
    8.52 -		AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
    8.53 +		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    8.54  		SetWindowPos(SDL_Window, HWND_TOPMOST,
    8.55  			bounds.left, bounds.top, 
    8.56  			bounds.right - bounds.left,
    8.57 @@ -1581,7 +1581,7 @@
    8.58  			bounds.top = SDL_windowY;
    8.59  			bounds.right = SDL_windowX+video->w;
    8.60  			bounds.bottom = SDL_windowY+video->h;
    8.61 -			AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0);
    8.62 +			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    8.63  			width = bounds.right-bounds.left;
    8.64  			height = bounds.bottom-bounds.top;
    8.65  			if ( center ) {