From f7c63ac40c900dec8138dee554547a38faf2cbde Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 14 Jul 2026 23:55:44 +0200 Subject: [PATCH] Display single FPS value in frame stats tooltip, if min and max are equal. --- profiler/src/profiler/TracyView_FrameStatistics.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_FrameStatistics.cpp b/profiler/src/profiler/TracyView_FrameStatistics.cpp index 79daa68d..5b00cf74 100644 --- a/profiler/src/profiler/TracyView_FrameStatistics.cpp +++ b/profiler/src/profiler/TracyView_FrameStatistics.cpp @@ -637,7 +637,16 @@ void View::DrawFrameStatistics() ImGui::SameLine(); ImGui::Text( "%s - %s", TimeToString( t0 ), TimeToString( t1 ) ); ImGui::SameLine(); - ImGui::TextDisabled( "(%s FPS - %s FPS)", RealToString( round( 1000000000.0 / t0 ) ), RealToString( round( 1000000000.0 / t1 ) ) ); + const auto fps0 = round( 1000000000.0 / t0 ); + const auto fps1 = round( 1000000000.0 / t1 ); + if( fps0 == fps1 ) + { + ImGui::TextDisabled( "(%s FPS)", RealToString( fps0 ) ); + } + else + { + ImGui::TextDisabled( "(%s FPS - %s FPS)", RealToString( fps0 ), RealToString( fps1 ) ); + } TextFocused( "Count:", RealToString( bins[bin] ) ); ImGui::EndTooltip(); }