add discrete120 scroll event (#120)

* add discrete120 scroll event
This commit is contained in:
Ferdinand Schober
2024-05-04 03:34:13 +02:00
committed by GitHub
parent 973360a774
commit 1f0d386d4a
9 changed files with 167 additions and 64 deletions

View File

@@ -180,6 +180,11 @@ impl VirtualInput {
self.pointer.axis(time, axis, value);
self.pointer.frame();
}
PointerEvent::AxisDiscrete120 { axis, value } => {
let axis: Axis = (axis as u32).try_into()?;
self.pointer.axis(0, axis, (value / 15) as f64);
self.pointer.frame();
}
PointerEvent::Frame {} => self.pointer.frame(),
}
self.pointer.frame();