From dbf6274bfffb9cd84af89b0db9fca86ea3eb6b6f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 3 Aug 2024 20:11:35 +0200 Subject: [PATCH] Remove threads that had group hint changed from thread order list. --- profiler/src/profiler/TracyView.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index 0ca85d54..bdeb7d72 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -709,6 +709,17 @@ bool View::DrawImpl() m_acb(); } + auto& threadHints = m_worker.GetPendingThreadHints(); + if( !threadHints.empty() ) + { + for( auto v : threadHints ) + { + auto it = std::find_if( m_threadOrder.begin(), m_threadOrder.end(), [v]( const auto& t ) { return t->id == v; } ); + if( it != m_threadOrder.end() ) m_threadOrder.erase( it ); // Will be added in the correct place later, like any newly appearing thread + } + m_worker.ClearPendingThreadHints(); + } + const auto& io = ImGui::GetIO(); m_wasActive = false;