diff --git a/src/config.rs b/src/config.rs index e7a8e09..746d6c4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -97,6 +97,10 @@ pub fn def_pw_tokens() -> PwTokenMap { AStrMap::new() } +fn def_mouse_move_interval_ms() -> u32 { + 14 // ~72fps +} + fn def_click_freeze_time_ms() -> u32 { 300 } @@ -179,6 +183,9 @@ pub struct GeneralConfig { #[serde(default = "def_click_freeze_time_ms")] pub click_freeze_time_ms: u32, + #[serde(default = "def_mouse_move_interval_ms")] + pub mouse_move_interval_ms: u32, + #[serde(default = "def_true")] pub notifications_enabled: bool, diff --git a/src/overlays/screen.rs b/src/overlays/screen.rs index a3e1716..26bed7e 100644 --- a/src/overlays/screen.rs +++ b/src/overlays/screen.rs @@ -129,6 +129,7 @@ impl InteractionHandler for ScreenInteractionHandler { { let pos = self.mouse_transform.transform_point2(hit.uv); app.hid_provider.mouse_move(pos); + set_next_move(app.session.config.mouse_move_interval_ms as u64); } None }