Browse Source

Fix win32 build; misc changes

gh-pages
falkTX 10 years ago
parent
commit
a296a76c70
2 changed files with 14 additions and 17 deletions
  1. +1
    -7
      dgl/src/pugl/pugl_win.cpp
  2. +13
    -10
      examples/Makefile

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

@@ -291,17 +291,11 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
processMouseEvent(view, 3, false, lParam);
break;
case WM_MOUSEWHEEL:
if (view->scrollFunc) {
view->scrollFunc(
view, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
(int16_t)HIWORD(wParam) / (float)WHEEL_DELTA);
}
break;
case WM_MOUSEHWHEEL:
if (view->scrollFunc) {
view->scrollFunc(
view, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
(int16_t)HIWORD(wParam) / float(WHEEL_DELTA), 0);
(int16_t)HIWORD(wParam) / (float)WHEEL_DELTA, 0);
}
break;
case WM_KEYDOWN:


+ 13
- 10
examples/Makefile View File

@@ -14,7 +14,7 @@ LINK_FLAGS += -L.. -ldgl $(DGL_LIBS)
# --------------------------------------------------------------

ifeq ($(WIN32),true)
TARGETS = app.exe cairo.exe color images.exe nekobi-ui.exe
TARGETS = app.exe color.exe images.exe nekobi-ui.exe
else
ifeq ($(MACOS),true)
TARGETS = app color images nekobi-ui
@@ -26,10 +26,20 @@ endif
# --------------------------------------------------------------

all: ../libdgl.a $(TARGETS)

clean:
$(MAKE) -C ../dgl clean
$(RM) $(TARGETS)

debug:
$(MAKE) DEBUG=true

# --------------------------------------------------------------

%.exe: %
rm -f $*.exe
mv $* $*.exe
ln -sf $*.exe $*

../libdgl.a: .FORCE
$(MAKE) -C ../dgl
@@ -53,14 +63,7 @@ nekobi-ui: nekobi-ui.cpp nekobi-ui_src/* ../dgl/*

# --------------------------------------------------------------

clean:
$(MAKE) -C ../dgl clean
$(RM) $(TARGETS)

debug:
$(MAKE) DEBUG=true

# --------------------------------------------------------------

.FORCE:
.PHONY: .FORCE

# --------------------------------------------------------------

Loading…
Cancel
Save