summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pugl/pugl_win.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index 2040b98..8ac879e 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -36,6 +36,15 @@
#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
+#endif
#define PUGL_LOCAL_CLOSE_MSG (WM_USER + 50)
@@ -154,7 +163,7 @@ puglCreateWindow(PuglView* view, const char* title)
free(view);
return 1;
}
-
+
#ifdef _WIN64
SetWindowLongPtr(impl->hwnd, GWLP_USERDATA, (LONG_PTR)view);
#else