From 43a18d42f41674d97b19b9b404b45534d4e2138b Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 5 Jul 2024 10:43:31 +0200 Subject: [PATCH] Make `InputState::predicted_dt` more accurate --- crates/egui/src/input_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/input_state.rs b/crates/egui/src/input_state.rs index cac8efe62d57..cf1a26903a31 100644 --- a/crates/egui/src/input_state.rs +++ b/crates/egui/src/input_state.rs @@ -353,7 +353,7 @@ impl InputState { max_texture_side: new.max_texture_side.unwrap_or(self.max_texture_side), time, unstable_dt, - predicted_dt: new.predicted_dt, + predicted_dt: new.predicted_dt.min(stable_dt), stable_dt, focused: new.focused, modifiers: new.modifiers,