Fix communication of fractional RI_MOUSE_WHEEL events (Windows) (#1877)
This commit is contained in:
parent
599477d754
commit
86748fbc68
3 changed files with 52 additions and 2 deletions
|
|
@ -2101,11 +2101,12 @@ unsafe extern "system" fn thread_event_target_callback<T: 'static>(
|
|||
}
|
||||
|
||||
if util::has_flag(mouse.usButtonFlags, winuser::RI_MOUSE_WHEEL) {
|
||||
let delta = mouse.usButtonData as SHORT / winuser::WHEEL_DELTA;
|
||||
let delta =
|
||||
mouse.usButtonData as SHORT as f32 / winuser::WHEEL_DELTA as f32;
|
||||
subclass_input.send_event(Event::DeviceEvent {
|
||||
device_id,
|
||||
event: MouseWheel {
|
||||
delta: LineDelta(0.0, delta as f32),
|
||||
delta: LineDelta(0.0, delta),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue