mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Fix x64 problems for WIN64.
This commit is contained in:
parent
6bfb7d8186
commit
fcf7bee64a
12 changed files with 52 additions and 22 deletions
|
|
@ -661,7 +661,7 @@ void Win32Window::_unregisterWindowClass()
|
|||
LRESULT PASCAL Win32Window::WindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
// CodeReview [tom, 4/30/2007] The two casts here seem somewhat silly and redundant ?
|
||||
Win32Window* window = (Win32Window*)((PlatformWindow*)GetWindowLong(hWnd, GWLP_USERDATA));
|
||||
Win32Window* window = (Win32Window*)((PlatformWindow*)GetWindowLongPtr(hWnd, GWLP_USERDATA));
|
||||
const WindowId devId = window ? window->getWindowId() : 0;
|
||||
|
||||
if (window && window->getOffscreenRender())
|
||||
|
|
@ -712,8 +712,8 @@ LRESULT PASCAL Win32Window::WindowProc( HWND hWnd, UINT message, WPARAM wParam,
|
|||
case WM_CREATE:
|
||||
// CodeReview [tom, 4/30/2007] Why don't we just cast this to a LONG
|
||||
// instead of having a ton of essentially pointless casts ?
|
||||
SetWindowLong(hWnd, GWLP_USERDATA,
|
||||
(LONG)((PlatformWindow*)((CREATESTRUCT*)lParam)->lpCreateParams));
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA,
|
||||
(LONG_PTR)((PlatformWindow*)((CREATESTRUCT*)lParam)->lpCreateParams));
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ void Win32WindowManager::buildMonitorsList()
|
|||
mMonitors.clear();
|
||||
|
||||
// Enumerate all monitors
|
||||
EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (U32)(void*)&mMonitors);
|
||||
EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (size_t)(void*)&mMonitors);
|
||||
}
|
||||
|
||||
S32 Win32WindowManager::findFirstMatchingMonitor(const char* name)
|
||||
|
|
@ -252,7 +252,7 @@ PlatformWindow *Win32WindowManager::createWindow(GFXDevice *device, const GFXVid
|
|||
w32w->setVideoMode(mode);
|
||||
|
||||
// Associate our window struct with the HWND.
|
||||
SetWindowLongPtrW(w32w->mWindowHandle, GWLP_USERDATA, (LONG)w32w);
|
||||
SetWindowLongPtr(w32w->mWindowHandle, GWLP_USERDATA, (LONG_PTR)w32w);
|
||||
|
||||
// Do some error checking.
|
||||
AssertFatal(w32w->mWindowHandle != NULL, "Win32WindowManager::createWindow - Could not create window!");
|
||||
|
|
@ -358,7 +358,7 @@ void Win32WindowManager::_process()
|
|||
|
||||
// [tom, 4/30/2007] I think this should work, but leaving the above commented
|
||||
// out just in case this is actually fubared with multiple windows.
|
||||
Win32Window* window = (Win32Window*)(GetWindowLong(msg.hwnd, GWLP_USERDATA));
|
||||
Win32Window* window = (Win32Window*)(GetWindowLongPtr(msg.hwnd, GWLP_USERDATA));
|
||||
if(window)
|
||||
translated = window->translateMessage(msg);
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ static bool _dispatch(HWND hWnd,UINT message,WPARAM wParam,WPARAM lParam)
|
|||
static S32 mouseNCState = -1; // -1 denotes unchanged,
|
||||
// 0 denotes changed but was hidden
|
||||
// 1 denotes changed but was visible
|
||||
Win32Window* window = hWnd?(Win32Window*)GetWindowLong(hWnd, GWLP_USERDATA): 0;
|
||||
Win32Window* window = hWnd?(Win32Window*)GetWindowLongPtr(hWnd, GWLP_USERDATA): 0;
|
||||
const WindowId devId = window ? window->getWindowId() : 0;
|
||||
|
||||
// State tracking for focus/lose focus cursor management
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue