mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-30 12:35:26 +00:00
Display single FPS value in frame stats tooltip, if min and max are equal.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user