mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Display non-rounded FPS in a tooltip.
This commit is contained in:
parent
230ee71368
commit
9da3364c77
@ -6381,9 +6381,21 @@ void View::DrawInfo()
|
|||||||
TextFocused( "Average frame time:", TimeToString( m_frameSortData.average ) );
|
TextFocused( "Average frame time:", TimeToString( m_frameSortData.average ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%s FPS)", RealToString( round( 1000000000.0 / m_frameSortData.average ), true ) );
|
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 ) );
|
TextFocused( "Median frame time:", TimeToString( m_frameSortData.median ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%s FPS)", RealToString( round( 1000000000.0 / m_frameSortData.median ), true ) );
|
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();
|
ImGui::Separator();
|
||||||
TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );
|
TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );
|
||||||
|
Loading…
Reference in New Issue
Block a user