1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Hook up attention callback.

This commit is contained in:
Bartosz Taudul
2022-10-13 19:31:47 +02:00
parent 575f627136
commit c89c4f46ea
3 changed files with 20 additions and 11 deletions
+4 -2
View File
@@ -46,7 +46,7 @@ double s_time = 0;
static View* s_instance = nullptr;
View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb )
View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
: m_worker( addr, port )
, m_staticView( false )
, m_viewMode( ViewMode::LastFrames )
@@ -62,6 +62,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr,
, m_fixedFont( fixedWidth )
, m_stcb( stcb )
, m_sscb( sscb )
, m_acb( acb )
, m_userData()
, m_cbMainThread( cbMainThread )
{
@@ -72,7 +73,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr,
InitTextEditor( fixedWidth );
}
View::View( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb )
View::View( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
: m_worker( f )
, m_filename( f.GetFilename() )
, m_staticView( true )
@@ -85,6 +86,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFon
, m_fixedFont( fixedWidth )
, m_stcb( stcb )
, m_sscb( sscb )
, m_acb( acb )
, m_userData( m_worker.GetCaptureProgram().c_str(), m_worker.GetCaptureTime() )
, m_cbMainThread( cbMainThread )
{