1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-03 14:03:52 +00:00

Proper frame names on frames graph.

This commit is contained in:
Bartosz Taudul 2018-08-04 21:46:26 +02:00
parent acabdf3c2a
commit 37f42a52fb

View File

@ -674,6 +674,8 @@ void View::DrawFrames()
TextFocused( "Max frame time:", TimeToString( f ) );
}
else
{
if( m_frames->name == 0 )
{
const auto offset = m_worker.GetFrameOffset();
if( sel == 0 )
@ -705,6 +707,15 @@ void View::DrawFrames()
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
}
}
else
{
ImGui::TextDisabled( "%s:", m_worker.GetString( m_frames->name ) );
ImGui::SameLine();
ImGui::Text( "%s", RealToString( sel, true ) );
ImGui::Separator();
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
}
}
TextFocused( "Time from start of program:", TimeToString( m_worker.GetFrameBegin( *m_frames, sel ) - m_worker.GetTimeBegin() ) );
ImGui::EndTooltip();