mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-29 16:10:54 +03:00
move refcounting of key presses to input-emulation (#169)
This commit is contained in:
committed by
GitHub
parent
68361b25d1
commit
8f7890c9be
@@ -1,5 +1,6 @@
|
||||
use crate::config::Config;
|
||||
use anyhow::Result;
|
||||
use input_emulation::InputEmulation;
|
||||
use input_event::{Event, PointerEvent};
|
||||
use std::f64::consts::PI;
|
||||
use std::time::{Duration, Instant};
|
||||
@@ -22,7 +23,7 @@ const RADIUS: f64 = 100.0;
|
||||
|
||||
async fn input_emulation_test(config: Config) -> Result<()> {
|
||||
let backend = config.emulation_backend.map(|b| b.into());
|
||||
let mut emulation = input_emulation::create(backend).await?;
|
||||
let mut emulation = InputEmulation::new(backend).await?;
|
||||
emulation.create(0).await;
|
||||
let start = Instant::now();
|
||||
let mut offset = (0, 0);
|
||||
|
||||
Reference in New Issue
Block a user