diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index 9e0b3cd2..83f5c25d 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -59,8 +59,7 @@ View::View( void(*cbMainThread)(const std::function&, bool), const char* , m_achievements( config.achievements ) { InitTextEditor(); - - m_vd.frameTarget = config.targetFps; + SetupConfig( config ); } View::View( void(*cbMainThread)(const std::function&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config, AchievementsMgr* amgr ) @@ -97,7 +96,7 @@ View::View( void(*cbMainThread)(const std::function&, bool), FileRead& f if( m_worker.GetCallstackFrameCount() == 0 ) m_showUnknownFrames = false; if( m_worker.GetCallstackSampleCount() == 0 ) m_showAllSymbols = true; - m_vd.frameTarget = config.targetFps; + SetupConfig( config ); Achieve( "loadTrace" ); } @@ -123,6 +122,11 @@ void View::InitTextEditor() m_sourceViewFile = nullptr; } +void View::SetupConfig( const Config& config ) +{ + m_vd.frameTarget = config.targetFps; +} + void View::Achieve( const char* id ) { if( !m_achievements || !m_achievementsMgr ) return; diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index b73ad30d..02526614 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -224,6 +224,7 @@ private: }; void InitTextEditor(); + void SetupConfig( const Config& config ); void Achieve( const char* id ); bool DrawImpl();