mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Move config setup to a separate function.
This commit is contained in:
parent
4a933d0174
commit
938ab3b8ea
@ -59,8 +59,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char*
|
||||
, m_achievements( config.achievements )
|
||||
{
|
||||
InitTextEditor();
|
||||
|
||||
m_vd.frameTarget = config.targetFps;
|
||||
SetupConfig( config );
|
||||
}
|
||||
|
||||
View::View( void(*cbMainThread)(const std::function<void()>&, 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<void()>&, 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;
|
||||
|
@ -224,6 +224,7 @@ private:
|
||||
};
|
||||
|
||||
void InitTextEditor();
|
||||
void SetupConfig( const Config& config );
|
||||
void Achieve( const char* id );
|
||||
|
||||
bool DrawImpl();
|
||||
|
Loading…
Reference in New Issue
Block a user