diff options
author | David Robillard <d@drobilla.net> | 2012-04-29 18:10:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-29 18:10:46 +0000 |
commit | d9732fbc106a6ac228912078888fbac65e78d26d (patch) | |
tree | d0b8c8f11c7cdcf8d117f853d680e4fa706d2a99 /pugl/pugl_x11.c | |
parent | d4b2829de83ca5f0efd3d1ee2683ee400e63ffe2 (diff) |
Scroll support on Windows.
Diffstat (limited to 'pugl/pugl_x11.c')
-rw-r--r-- | pugl/pugl_x11.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c index 735cdb1..c6cc2b5 100644 --- a/pugl/pugl_x11.c +++ b/pugl/pugl_x11.c @@ -240,12 +240,12 @@ puglProcessEvents(PuglWindow* win) case ButtonPress: if (event.xbutton.button >= 4 && event.xbutton.button <= 7) { if (win->scrollFunc) { - int dx = 0, dy = 0; + float dx = 0, dy = 0; switch (event.xbutton.button) { - case 4: dy = 1; break; - case 5: dy = -1; break; - case 6: dx = -1; break; - case 7: dx = 1; break; + case 4: dy = 1.0f; break; + case 5: dy = -1.0f; break; + case 6: dx = -1.0f; break; + case 7: dx = 1.0f; break; } win->scrollFunc(win, dx, dy); } |