From 9da3364c77142fa8f9950ed5c39417dffd1f8174 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 31 Aug 2018 18:58:39 +0200 Subject: [PATCH] Display non-rounded FPS in a tooltip. --- server/TracyView.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 91cbae68..b657eb04 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6381,9 +6381,21 @@ void View::DrawInfo() TextFocused( "Average frame time:", TimeToString( m_frameSortData.average ) ); ImGui::SameLine(); ImGui::TextDisabled( "(%s FPS)", RealToString( round( 1000000000.0 / m_frameSortData.average ), true ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "%s FPS", RealToString( 1000000000.0 / m_frameSortData.average, true ) ); + ImGui::EndTooltip(); + } TextFocused( "Median frame time:", TimeToString( m_frameSortData.median ) ); ImGui::SameLine(); ImGui::TextDisabled( "(%s FPS)", RealToString( round( 1000000000.0 / m_frameSortData.median ), true ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "%s FPS", RealToString( 1000000000.0 / m_frameSortData.median, true ) ); + ImGui::EndTooltip(); + } } ImGui::Separator(); TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );