commit 0c9ad522ba4a01baf77279552e367cbf731e7925
parent a296a76c708abd089ea589643f6623bde9c0ced8
Author: falkTX <falktx@gmail.com>
Date: Mon, 27 Jan 2014 00:31:58 +0000
Fix build on 64bit windows
Diffstat:
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dgl/src/pugl/pugl_win.cpp b/dgl/src/pugl/pugl_win.cpp
@@ -107,8 +107,12 @@ puglCreate(PuglNativeWindow parent,
free(view);
return NULL;
}
-
+
+#ifdef _WIN64
+ SetWindowLongPtr(impl->hwnd, GWLP_USERDATA, (LONG_PTR)view);
+#else
SetWindowLongPtr(impl->hwnd, GWL_USERDATA, (LONG)view);
+#endif
impl->hdc = GetDC(impl->hwnd);
@@ -344,7 +348,12 @@ 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:
PostMessage(hwnd, WM_SHOWWINDOW, TRUE, 0);
diff --git a/examples/Makefile b/examples/Makefile
@@ -29,7 +29,7 @@ all: ../libdgl.a $(TARGETS)
clean:
$(MAKE) -C ../dgl clean
- $(RM) $(TARGETS)
+ $(RM) *.exe app cairo color images nekobi-ui
debug:
$(MAKE) DEBUG=true