From 87b68aaa7bd72af68b32b4384f486623d20ac2f6 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 19 Aug 2025 18:16:48 +0200 Subject: [PATCH] Prevent negative deltatime in imgui --- client/render/imgui_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index 098cac42..75556eca 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -718,7 +718,7 @@ void imgui_context::new_frame(XrTime display_time) ImPlot::SetCurrentContext(plot_context); if (last_display_time) - io.DeltaTime = std::min((display_time - last_display_time) * 1e-9f, 0.0166f); + io.DeltaTime = std::clamp((display_time - last_display_time) * 1e-9f, 0.001f, 0.0166f); last_display_time = display_time; // Uses the window list from last frame