From 9116b6c8cd92f0b38e310ed03088e87db50bb465 Mon Sep 17 00:00:00 2001 From: Josh Groves Date: Thu, 14 Jul 2022 17:30:22 -0230 Subject: [PATCH] windows: Use correct value for mouse wheel delta (#2374) --- src/platform_impl/windows/event_loop.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 7e4b7fbd..d0a85743 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -2272,7 +2272,8 @@ unsafe extern "system" fn thread_event_target_callback( let mouse_button_flags = mouse.Anonymous.Anonymous.usButtonFlags; if util::has_flag(mouse_button_flags as u32, RI_MOUSE_WHEEL) { - let delta = mouse_button_flags as i16 as f32 / WHEEL_DELTA as f32; + let delta = mouse.Anonymous.Anonymous.usButtonData as i16 as f32 + / WHEEL_DELTA as f32; userdata.send_event(Event::DeviceEvent { device_id, event: MouseWheel {