Commit 26101821 authored by Sam Lantinga's avatar Sam Lantinga

More Win64 updates

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401484
parent 309cc6b8
......@@ -150,7 +150,9 @@ typedef unsigned int uintptr_t;
#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 */
......@@ -128,7 +128,7 @@ void SDL_SYS_TimerQuit(void)
/* 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 @@ void SDL_SYS_StopTimer(void)
/* 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();
}
......
......@@ -710,7 +710,7 @@ SDL_Surface *GAPI_SetVideoMode(_THIS, SDL_Surface *current,
style = 0;
if (!SDL_windowid)
SetWindowLongPtr(SDL_Window, GWL_STYLE, style);
SetWindowLong(SDL_Window, GWL_STYLE, style);
/* Allocate bitmap */
if(gapiBuffer)
......
......@@ -562,7 +562,7 @@ LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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,
......
......@@ -45,7 +45,7 @@ static int WIN_GL_ResetWindow(_THIS)
/* 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,
......
......@@ -392,7 +392,7 @@ static SDL_keysym *TranslateKey(WPARAM vkey, UINT scancode, SDL_keysym *keysym,
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];
}
......
......@@ -647,7 +647,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
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 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
/* 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 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
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) ) {
......
......@@ -1123,7 +1123,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
}
#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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
/* 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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
}
/* 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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
}
/* 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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
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 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
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 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment