diff options
Diffstat (limited to 'src/api/win32')
-rw-r--r-- | src/api/win32/callback.rs | 5 |
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 }, |