Mercurial > sdl-ios-xcode
changeset 1480:0a2bd6507477
More Win64 updates
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Mar 2006 05:21:32 +0000 |
parents | 993ef9ff4688 |
children | deb22b9fe970 |
files | 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 |
diffstat | 8 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/include/SDL_config_win32.h Tue Mar 07 04:58:30 2006 +0000 +++ b/include/SDL_config_win32.h Tue Mar 07 05:21:32 2006 +0000 @@ -150,7 +150,9 @@ #define SDL_VIDEO_OPENGL_WGL 1 #endif -/* Enable assembly routines */ +/* Enable assembly routines (Win64 doesn't have inline asm) */ +#ifndef _WIN64 #define SDL_ASSEMBLY_ROUTINES 1 +#endif #endif /* _SDL_config_win32_h */
--- a/src/timer/win32/SDL_systimer.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/timer/win32/SDL_systimer.c Tue Mar 07 05:21:32 2006 +0000 @@ -128,7 +128,7 @@ /* Forward declaration because this is called by the timer callback */ int SDL_SYS_StartTimer(void); -static VOID CALLBACK TimerCallbackProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) +static VOID CALLBACK TimerCallbackProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { Uint32 ms; @@ -170,8 +170,8 @@ /* Data to handle a single periodic alarm */ static UINT timerID = 0; -static void CALLBACK HandleAlarm(UINT uID, UINT uMsg, DWORD dwUser, - DWORD dw1, DWORD dw2) +static void CALLBACK HandleAlarm(UINT uID, UINT uMsg, DWORD_PTR dwUser, + DWORD_PTR dw1, DWORD_PTR dw2) { SDL_ThreadedTimerCheck(); }
--- a/src/video/gapi/SDL_gapivideo.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/gapi/SDL_gapivideo.c Tue Mar 07 05:21:32 2006 +0000 @@ -710,7 +710,7 @@ style = 0; if (!SDL_windowid) - SetWindowLongPtr(SDL_Window, GWL_STYLE, style); + SetWindowLong(SDL_Window, GWL_STYLE, style); /* Allocate bitmap */ if(gapiBuffer)
--- a/src/video/wincommon/SDL_sysevents.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/wincommon/SDL_sysevents.c Tue Mar 07 05:21:32 2006 +0000 @@ -562,7 +562,7 @@ Aparently it's too difficult for MS to check inside their function, so I have to do it here. */ - style = GetWindowLongPtr(hwnd, GWL_STYLE); + style = GetWindowLong(hwnd, GWL_STYLE); AdjustWindowRect( &size, style,
--- a/src/video/wincommon/SDL_wingl.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/wincommon/SDL_wingl.c Tue Mar 07 05:21:32 2006 +0000 @@ -45,7 +45,7 @@ /* Save the existing window attributes */ LONG style; RECT rect = { 0, 0, 0, 0 }; - style = GetWindowLongPtr(SDL_Window, GWL_STYLE); + style = GetWindowLong(SDL_Window, GWL_STYLE); GetWindowRect(SDL_Window, &rect); DestroyWindow(SDL_Window); SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
--- a/src/video/windib/SDL_dibevents.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/windib/SDL_dibevents.c Tue Mar 07 05:21:32 2006 +0000 @@ -392,7 +392,7 @@ Uint16 wchars[2]; GetKeyboardState(keystate); - if (SDL_ToUnicode(vkey, scancode, keystate, wchars, sizeof(wchars)/sizeof(wchars[0]), 0) == 1) + if (SDL_ToUnicode((UINT)vkey, scancode, keystate, wchars, sizeof(wchars)/sizeof(wchars[0]), 0) == 1) { keysym->unicode = wchars[0]; }
--- a/src/video/windib/SDL_dibvideo.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/windib/SDL_dibvideo.c Tue Mar 07 05:21:32 2006 +0000 @@ -647,7 +647,7 @@ screen_pal = DIB_CreatePalette(bpp); } - style = GetWindowLongPtr(SDL_Window, GWL_STYLE); + style = GetWindowLong(SDL_Window, GWL_STYLE); style &= ~(resizestyle|WS_MAXIMIZE); if ( (video->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) { style &= ~windowstyle; @@ -677,7 +677,7 @@ /* DJM: Don't piss of anyone who has setup his own window */ if ( !SDL_windowid ) - SetWindowLongPtr(SDL_Window, GWL_STYLE, style); + SetWindowLong(SDL_Window, GWL_STYLE, style); /* Delete the old bitmap if necessary */ if ( screen_bmp != NULL ) { @@ -780,7 +780,7 @@ bounds.top = SDL_windowY; bounds.right = SDL_windowX+video->w; bounds.bottom = SDL_windowY+video->h; - AdjustWindowRectEx(&bounds, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0); + AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); width = bounds.right-bounds.left; height = bounds.bottom-bounds.top; if ( (flags & SDL_FULLSCREEN) ) {
--- a/src/video/windx5/SDL_dx5video.c Tue Mar 07 04:58:30 2006 +0000 +++ b/src/video/windx5/SDL_dx5video.c Tue Mar 07 05:21:32 2006 +0000 @@ -1123,7 +1123,7 @@ } #endif /* !NO_CHANGEDISPLAYSETTINGS */ - style = GetWindowLongPtr(SDL_Window, GWL_STYLE); + style = GetWindowLong(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 ) - SetWindowLongPtr(SDL_Window, GWL_STYLE, style); + SetWindowLong(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, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0); + AdjustWindowRectEx(&bounds, GetWindowLong(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 = GetWindowLongPtr(SDL_Window, GWL_STYLE); + style = GetWindowLong(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 ) - SetWindowLongPtr(SDL_Window, GWL_STYLE, style); + SetWindowLong(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, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0); + AdjustWindowRectEx(&bounds, GetWindowLong(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, GetWindowLongPtr(SDL_Window, GWL_STYLE), FALSE, 0); + AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); width = bounds.right-bounds.left; height = bounds.bottom-bounds.top; if ( center ) {