Use on demand flag to determine if need to show missed frames.

This commit is contained in:
Bartosz Taudul 2023-03-04 00:25:30 +01:00
parent 5ebc499f49
commit 9155b01ddf
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 2 additions and 3 deletions

View File

@ -145,14 +145,13 @@ void View::DrawFrames()
m_frameHover = sel;
if( m_frames->name == 0 )
{
const auto offset = m_worker.GetFrameOffset();
if( sel == 0 )
{
ImGui::TextUnformatted( "Tracy initialization" );
ImGui::Separator();
TextFocused( "Time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
}
else if( offset == 0 )
else if( !m_worker.IsOnDemand() )
{
TextDisabledUnformatted( "Frame:" );
ImGui::SameLine();

View File

@ -778,7 +778,7 @@ const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint
{
sprintf( buf, "Tracy init (%s)", TimeToString( ftime ) );
}
else if( offset == 0 )
else if( !m_worker.IsOnDemand() )
{
sprintf( buf, "Frame %s (%s)", RealToString( fnum ), TimeToString( ftime ) );
}