diff options
author | David Robillard <d@drobilla.net> | 2014-01-17 21:56:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-17 21:56:37 +0000 |
commit | 12898ecf40723adb674bad95c10d1e8092794297 (patch) | |
tree | 131ca9eebaa3c488b7124db4831392872f25caf1 /pugl/pugl_win.cpp | |
parent | cea41bcb9be36fdfe9d273133996e1622586f27b (diff) | |
download | pugl-12898ecf40723adb674bad95c10d1e8092794297.tar.gz pugl-12898ecf40723adb674bad95c10d1e8092794297.tar.bz2 pugl-12898ecf40723adb674bad95c10d1e8092794297.zip |
Add mouse position to PuglScrollFunc (apply #896).
Fix compilation of pugl_test.
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r-- | pugl/pugl_win.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index 780752b..c95a2d2 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -286,13 +286,15 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEWHEEL: if (view->scrollFunc) { view->scrollFunc( - view, 0, (int16_t)HIWORD(wParam) / (float)WHEEL_DELTA); + 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, (int16_t)HIWORD(wParam) / float(WHEEL_DELTA), 0); + view, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), + (int16_t)HIWORD(wParam) / float(WHEEL_DELTA), 0); } break; case WM_KEYDOWN: |