From cad8c7eadd9e079c643b88d5e18c790b80b74ad8 Mon Sep 17 00:00:00 2001 From: Devin Droddy Date: Mon, 13 May 2024 16:25:44 -0400 Subject: [PATCH] ignore mouse movements if `time_diff` is unrealistically small --- src/nuhxboard.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nuhxboard.rs b/src/nuhxboard.rs index 5fefd50..b9f67a1 100644 --- a/src/nuhxboard.rs +++ b/src/nuhxboard.rs @@ -386,6 +386,9 @@ impl Application for NuhxBoard { Ok(diff) => diff, Err(_) => return Command::none(), }; + if time_diff.as_micros() < 100 { + return Command::none(); + } let mut center = (0.0, 0.0);