diff options
author | David Robillard <d@drobilla.net> | 2019-06-30 18:36:18 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-06-30 19:01:34 +0200 |
commit | 9c3c035ceac96b67f727844823705acce0eb776e (patch) | |
tree | d4a44ec444e92f409705c65fec29e6716c434f2b | |
parent | 6d1e70f66fddbf12eb403b285f2109e06d8ffaea (diff) | |
download | pugl-9c3c035ceac96b67f727844823705acce0eb776e.tar.gz pugl-9c3c035ceac96b67f727844823705acce0eb776e.tar.bz2 pugl-9c3c035ceac96b67f727844823705acce0eb776e.zip |
Clean up redundant wrappers around SetWindowLongPtr
-rw-r--r-- | pugl/pugl_win.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index dabaa69..1933586 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -38,14 +38,8 @@ #ifndef WHEEL_DELTA # define WHEEL_DELTA 120 #endif -#ifdef _WIN64 -# ifndef GWLP_USERDATA -# define GWLP_USERDATA (-21) -# endif -#else -# ifndef GWL_USERDATA -# define GWL_USERDATA (-21) -# endif +#ifndef GWLP_USERDATA +# define GWLP_USERDATA (-21) #endif #define PUGL_LOCAL_CLOSE_MSG (WM_USER + 50) @@ -327,11 +321,7 @@ puglCreateWindow(PuglView* view, const char* title) QueryPerformanceFrequency(&frequency); impl->timerFrequency = static_cast<double>(frequency.QuadPart); -#ifdef _WIN64 SetWindowLongPtr(impl->hwnd, GWLP_USERDATA, (LONG_PTR)view); -#else - SetWindowLongPtr(impl->hwnd, GWL_USERDATA, (LONG)view); -#endif return 0; } @@ -743,11 +733,7 @@ puglProcessEvents(PuglView* view) LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { -#ifdef _WIN64 PuglView* view = (PuglView*)GetWindowLongPtr(hwnd, GWLP_USERDATA); -#else - PuglView* view = (PuglView*)GetWindowLongPtr(hwnd, GWL_USERDATA); -#endif switch (message) { case WM_CREATE: |