Browse Source

Fix build on 64bit windows

gh-pages
falkTX 10 years ago
parent
commit
0c9ad522ba
2 changed files with 11 additions and 2 deletions
  1. +10
    -1
      dgl/src/pugl/pugl_win.cpp
  2. +1
    -1
      examples/Makefile

+ 10
- 1
dgl/src/pugl/pugl_win.cpp View File

@@ -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);


+ 1
- 1
examples/Makefile View File

@@ -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


Loading…
Cancel
Save