diff options
author | Jürgen Herrmann <shadowrom@me.com> | 2013-05-14 00:27:05 +0400 |
---|---|---|
committer | Jürgen Herrmann <shadowrom@me.com> | 2013-05-14 00:27:05 +0400 |
commit | 3d3a4e8eec2a1549fd8b0ec32e6ddd73af5938d5 (patch) | |
tree | f392e410dae7c51c13cecbccecd918f17439e8db /intern/ghost | |
parent | 92da9792fe7f3d2b67f59133c584786aa72777ae (diff) |
Patch [#35234]:
Fix GetWindowsLon and SetWindowsLong issues with VS2012 and Windows 8.
Remove unneeded #ifdef block for GWL_WNDPROC and GWL_USERDATA
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 10 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index c51ddbed176..9ad89667e76 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -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 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, 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 diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index e5e734e4e57..3871ececee8 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -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 @@ GHOST_WindowWin32::GHOST_WindowWin32( } // 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); |