From d9f0d92584af1d76779cb8cb4a70762c889970f5 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 29 Apr 2015 14:06:11 +0200 Subject: Rework MouseWheel event and fix the values on win32 --- src/api/win32/callback.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/api/win32') diff --git a/src/api/win32/callback.rs b/src/api/win32/callback.rs index e852eeb..1ea95a5 100644 --- a/src/api/win32/callback.rs +++ b/src/api/win32/callback.rs @@ -114,8 +114,9 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT, let value = (wparam >> 16) as i16; let value = value as i32; + let value = value as f64 / winapi::WHEEL_DELTA as f64; - send_event(window, MouseWheel(value)); + send_event(window, MouseWheel(0.0, value)); 0 }, -- cgit v1.2.3