From b80ede3ec607c5b4d7254cf00e8f548656ed9879 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 11 Dec 2022 18:01:32 +0100 Subject: [PATCH] Limit time delta to 0.1s. --- profiler/src/BackendWayland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/src/BackendWayland.cpp b/profiler/src/BackendWayland.cpp index f3455544..51924e34 100644 --- a/profiler/src/BackendWayland.cpp +++ b/profiler/src/BackendWayland.cpp @@ -521,7 +521,7 @@ void Backend::NewFrame( int& w, int& h ) ImGui_ImplOpenGL3_NewFrame(); uint64_t time = std::chrono::duration_cast( std::chrono::high_resolution_clock::now().time_since_epoch() ).count(); - io.DeltaTime = ( time - s_time ) / 1000000.f; + io.DeltaTime = std::min( 0.1f, ( time - s_time ) / 1000000.f ); s_time = time; }