mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
simplify
This commit is contained in:
@@ -145,11 +145,7 @@ fn to_mouse_event(wparam: WPARAM, lparam: LPARAM) -> Option<PointerEvent> {
|
||||
let (ex, ey) = ENTRY_POINT;
|
||||
let (dx, dy) = (x - ex, y - ey);
|
||||
let (dx, dy) = (dx as f64, dy as f64);
|
||||
Some(PointerEvent::Motion {
|
||||
time: 0,
|
||||
dx: dx as f64,
|
||||
dy: dy as f64,
|
||||
})
|
||||
Some(PointerEvent::Motion { time: 0, dx, dy })
|
||||
},
|
||||
WPARAM(p) if p == WM_MOUSEWHEEL as usize => Some(PointerEvent::AxisDiscrete120 {
|
||||
axis: 0,
|
||||
|
||||
@@ -115,8 +115,8 @@ impl LibeiEmulation {
|
||||
.await?;
|
||||
let events = EiConvertEventStream::new(events, handshake.serial);
|
||||
let devices = Devices::default();
|
||||
let ei_task =
|
||||
tokio::task::spawn_local(ei_event_handler(events, context.clone(), devices.clone()));
|
||||
let ei_handler = ei_event_handler(events, context.clone(), devices.clone());
|
||||
let ei_task = tokio::task::spawn_local(ei_handler);
|
||||
|
||||
let serial = AtomicU32::new(handshake.serial);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user