[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56774] trunk/blender: Patch [#35234]:
Jürgen Herrmann
shadowrom at me.com
Mon May 13 22:27:06 CEST 2013
Revision: 56774
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56774
Author: shadowrom
Date: 2013-05-13 20:27:05 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Patch [#35234]:
Fix GetWindowsLon and SetWindowsLong issues with VS2012 and Windows 8.
Remove unneeded #ifdef block for GWL_WNDPROC and GWL_USERDATA
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp 2013-05-13 17:42:27 UTC (rev 56773)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp 2013-05-13 20:27:05 UTC (rev 56774)
@@ -47,14 +47,6 @@
#include <shlobj.h>
#include <tlhelp32.h>
-// win64 doesn't define GWL_USERDATA
-#ifdef WIN32
-# ifndef GWL_USERDATA
-# define GWL_USERDATA GWLP_USERDATA
-# define GWL_WNDPROC GWLP_WNDPROC
-# endif
-#endif
-
#include "utfconv.h"
#include "GHOST_DisplayManagerWin32.h"
@@ -904,7 +896,7 @@
GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized");
if (hwnd) {
- GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
+ GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (window) {
switch (msg) {
// we need to check if new key layout has AltGr
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-05-13 17:42:27 UTC (rev 56773)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-05-13 20:27:05 UTC (rev 56774)
@@ -50,14 +50,6 @@
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SAMPLES_ARB 0x2042
-// win64 doesn't define GWL_USERDATA
-#ifdef WIN32 /* why? - probably should remove */
-# ifndef GWL_USERDATA
-# define GWL_USERDATA GWLP_USERDATA
-# define GWL_WNDPROC GWLP_WNDPROC
-# endif
-#endif
-
const wchar_t *GHOST_WindowWin32::s_windowClassName = L"GHOST_WindowClass";
const int GHOST_WindowWin32::s_maxTitleLength = 128;
HGLRC GHOST_WindowWin32::s_firsthGLRc = NULL;
@@ -270,7 +262,7 @@
}
// Store a pointer to this class in the window structure
- ::SetWindowLongPtr(m_hWnd, GWL_USERDATA, (LONG_PTR) this);
+ ::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR) this);
m_wsh.setHWND(m_hWnd);
m_wsh.setMinSize(320, 240);
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp 2013-05-13 17:42:27 UTC (rev 56773)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp 2013-05-13 20:27:05 UTC (rev 56774)
@@ -260,14 +260,14 @@
}
SetParent(ghost_hwnd, parentWindow);
- LONG style = GetWindowLong(ghost_hwnd, GWL_STYLE);
- LONG exstyle = GetWindowLong(ghost_hwnd, GWL_EXSTYLE);
+ LONG_PTR style = GetWindowLongPtr(ghost_hwnd, GWL_STYLE);
+ LONG_PTR exstyle = GetWindowLongPtr(ghost_hwnd, GWL_EXSTYLE);
RECT adjrc = { 0, 0, windowWidth, windowHeight };
AdjustWindowRectEx(&adjrc, style, FALSE, exstyle);
style = (style & (~(WS_POPUP|WS_OVERLAPPEDWINDOW|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_TILEDWINDOW ))) | WS_CHILD;
- SetWindowLong(ghost_hwnd, GWL_STYLE, style);
+ SetWindowLongPtr(ghost_hwnd, GWL_STYLE, style);
SetWindowPos(ghost_hwnd, NULL, adjrc.left, adjrc.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
/* Check the size of the client rectangle of the window and resize the window
More information about the Bf-blender-cvs
mailing list