Skip to content

Commit

Permalink
add mouse_move_interval_ms setting
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Nov 23, 2024
1 parent 3073657 commit 2c31d57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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,

Expand Down
1 change: 1 addition & 0 deletions src/overlays/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2c31d57

Please sign in to comment.