From 94fd3b664e5428c245b04c57baad0d427adda7c2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 13 Oct 2022 20:36:54 +0200 Subject: [PATCH] Add attention callback helper. --- server/TracyView.hpp | 2 ++ server/TracyView_Utility.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/server/TracyView.hpp b/server/TracyView.hpp index c3c5312f..36b02118 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -349,6 +349,8 @@ private: void SetPlaybackFrame( uint32_t idx ); bool Save( const char* fn, FileWrite::Compression comp, int zlevel, bool buildDict ); + void Attention( bool& alreadyDone ); + unordered_flat_map m_visibleMsgThread; unordered_flat_map m_waitStackThread; unordered_flat_map m_gpuDrift; diff --git a/server/TracyView_Utility.cpp b/server/TracyView_Utility.cpp index 8ef2f44a..1cb71a02 100644 --- a/server/TracyView_Utility.cpp +++ b/server/TracyView_Utility.cpp @@ -864,4 +864,13 @@ const char* View::GetThreadContextData( uint64_t thread, bool& _local, bool& _un return label; } +void View::Attention( bool& alreadyDone ) +{ + if( !alreadyDone ) + { + alreadyDone = true; + m_acb(); + } +} + }