Display non-rounded FPS in a tooltip.

This commit is contained in:
Bartosz Taudul 2018-08-31 18:58:39 +02:00
parent 230ee71368
commit 9da3364c77

View File

@ -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() );