diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 0cefd715..f09a15ce 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1166,7 +1166,21 @@ bool View::DrawImpl() m_lockInfoAnim.Update( io.DeltaTime ); m_statBuzzAnim.Update( io.DeltaTime ); - if( m_firstFrame > 0 ) m_firstFrame--; + if( m_firstFrame ) + { + const auto now = std::chrono::high_resolution_clock::now(); + if( m_firstFrameTime.time_since_epoch().count() == 0 ) + { + m_firstFrameTime = now; + } + else + { + if( std::chrono::duration_cast( now - m_firstFrameTime ).count() > 500 ) + { + m_firstFrame = false; + } + } + } if( m_reactToCrash ) { @@ -2784,7 +2798,7 @@ void View::AdjustThreadHeight( View::VisData& vis, int oldOffset, int& offset ) } else if( vis.height < h ) { - if( m_firstFrame > 0 ) + if( m_firstFrame ) { vis.height = h; offset = oldOffset + h; diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 09a2139d..c16b66f9 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -485,7 +485,8 @@ private: UserData m_userData; bool m_reconnectRequested = false; - int m_firstFrame = 10; + bool m_firstFrame = true; + std::chrono::time_point m_firstFrameTime; float m_yDelta; std::vector m_sourceSubstitutions;