mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-25 22:20:53 +03:00
code cleanup + purge anyhow in library code (#157)
This commit is contained in:
committed by
GitHub
parent
703465a370
commit
6a4dd740c3
@@ -37,12 +37,8 @@ async fn input_emulation_test(config: Config) -> Result<()> {
|
||||
if new_offset != offset {
|
||||
let relative_motion = (new_offset.0 - offset.0, new_offset.1 - offset.1);
|
||||
offset = new_offset;
|
||||
let (relative_x, relative_y) = (relative_motion.0 as f64, relative_motion.1 as f64);
|
||||
let event = Event::Pointer(PointerEvent::Motion {
|
||||
time: 0,
|
||||
relative_x,
|
||||
relative_y,
|
||||
});
|
||||
let (dx, dy) = (relative_motion.0 as f64, relative_motion.1 as f64);
|
||||
let event = Event::Pointer(PointerEvent::Motion { time: 0, dx, dy });
|
||||
emulation.consume(event, 0).await?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user