Skip to content

Commit

Permalink
ignore mouse movements if time_diff is unrealistically small
Browse files Browse the repository at this point in the history
on linux, polling rate was too high or something so the mouse speed
indicator was really unstable
  • Loading branch information
justDeeevin committed May 13, 2024
1 parent b67788b commit 98328fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nuhxboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ impl Application for NuhxBoard {
Ok(diff) => diff,
Err(_) => return Command::none(),
};
if time_diff.as_millis() < 10 {
return Command::none();
}

let mut center = (0.0, 0.0);

Expand Down

0 comments on commit 98328fa

Please sign in to comment.