1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Display target FPS also as time available.

This commit is contained in:
Bartosz Taudul 2021-06-08 22:56:06 +02:00
parent c79bfa349f
commit 66318bdb3b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -8510,12 +8510,14 @@ void View::DrawOptions()
m_vd.drawFrameTargets = val; m_vd.drawFrameTargets = val;
ImGui::Indent(); ImGui::Indent();
int tmp = m_vd.frameTarget; int tmp = m_vd.frameTarget;
ImGui::SetNextItemWidth( 120 ); ImGui::SetNextItemWidth( 90 );
if( ImGui::InputInt( "Target FPS", &tmp ) ) if( ImGui::InputInt( "Target FPS", &tmp ) )
{ {
if( tmp < 1 ) tmp = 1; if( tmp < 1 ) tmp = 1;
m_vd.frameTarget = tmp; m_vd.frameTarget = tmp;
} }
ImGui::SameLine();
TextDisabledUnformatted( TimeToString( 1000*1000*1000 / tmp ) );
ImGui::Unindent(); ImGui::Unindent();
if( m_worker.HasContextSwitches() ) if( m_worker.HasContextSwitches() )
{ {