aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/win32
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-06-16 08:52:25 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-06-16 08:52:25 +0200
commit5e8271dad0a56697f0729c094dfe29cab302460b (patch)
tree07901f0a48dc1426d034bbb39dfed100cc3e7a40 /src/api/win32
parenta0e29d9410181368eee1e0b6db1bbbf11abf45f8 (diff)
parentb2c2f300dce0b874efee4c328629ff9c2316c056 (diff)
downloadglutin-5e8271dad0a56697f0729c094dfe29cab302460b.tar.gz
glutin-5e8271dad0a56697f0729c094dfe29cab302460b.zip
Merge pull request #483 from robertknight/rob-precise_scroll_deltas
Specify scroll deltas as either line or pixel-based
Diffstat (limited to 'src/api/win32')
-rw-r--r--src/api/win32/callback.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/win32/callback.rs b/src/api/win32/callback.rs
index 86d5f1c..6ac56f3 100644
--- a/src/api/win32/callback.rs
+++ b/src/api/win32/callback.rs
@@ -112,12 +112,13 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
winapi::WM_MOUSEWHEEL => {
use events::Event::MouseWheel;
+ use events::MouseScrollDelta::LineDelta;
let value = (wparam >> 16) as i16;
let value = value as i32;
- let value = value as f64 / winapi::WHEEL_DELTA as f64;
+ let value = value as f32 / winapi::WHEEL_DELTA as f32;
- send_event(window, MouseWheel(0.0, value));
+ send_event(window, MouseWheel(LineDelta(0.0, value)));
0
},