mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-08 11:51:27 +03:00
committed by
GitHub
parent
973360a774
commit
1f0d386d4a
@@ -157,8 +157,20 @@ impl InputEmulation for LibeiEmulation {
|
||||
}
|
||||
if let Some((d, s)) = self.scroll.as_mut() {
|
||||
match axis {
|
||||
0 => s.scroll_discrete(0, value as i32),
|
||||
_ => s.scroll_discrete(value as i32, 0),
|
||||
0 => s.scroll(0., value as f32),
|
||||
_ => s.scroll(value as f32, 0.),
|
||||
}
|
||||
d.frame(self.serial, now);
|
||||
}
|
||||
}
|
||||
crate::event::PointerEvent::AxisDiscrete120 { axis, value } => {
|
||||
if !self.has_scroll {
|
||||
return;
|
||||
}
|
||||
if let Some((d, s)) = self.scroll.as_mut() {
|
||||
match axis {
|
||||
0 => s.scroll_discrete(0, value),
|
||||
_ => s.scroll_discrete(value, 0),
|
||||
}
|
||||
d.frame(self.serial, now);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user