mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
windows: Use correct value for mouse wheel delta (#2374)
This commit is contained in:
parent
990e34a129
commit
9116b6c8cd
|
@ -2272,7 +2272,8 @@ unsafe extern "system" fn thread_event_target_callback<T: 'static>(
|
|||
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 {
|
||||
|
|
Loading…
Reference in a new issue