mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 00:23:47 +00:00
Move saving user data to a separate function.
This commit is contained in:
@@ -115,11 +115,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f
|
||||
View::~View()
|
||||
{
|
||||
m_worker.Shutdown();
|
||||
|
||||
m_userData.StoreState( m_vd );
|
||||
m_userData.StoreAnnotations( m_annotations );
|
||||
m_userData.StoreSourceSubstitutions( m_sourceSubstitutions );
|
||||
m_userData.Save();
|
||||
SaveUserData();
|
||||
|
||||
if( m_compare.loadThread.joinable() ) m_compare.loadThread.join();
|
||||
if( m_saveThread.joinable() ) m_saveThread.join();
|
||||
@@ -156,6 +152,14 @@ void View::Achieve( const char* id )
|
||||
m_achievementsMgr->Achieve( id );
|
||||
}
|
||||
|
||||
void View::SaveUserData()
|
||||
{
|
||||
m_userData.StoreState( m_vd );
|
||||
m_userData.StoreAnnotations( m_annotations );
|
||||
m_userData.StoreSourceSubstitutions( m_sourceSubstitutions );
|
||||
m_userData.Save();
|
||||
}
|
||||
|
||||
void View::ViewSource( const char* fileName, int line )
|
||||
{
|
||||
assert( fileName );
|
||||
|
||||
@@ -269,6 +269,7 @@ private:
|
||||
void InitTextEditor();
|
||||
void SetupConfig();
|
||||
void Achieve( const char* id );
|
||||
void SaveUserData();
|
||||
|
||||
bool DrawImpl();
|
||||
void DrawFrameImage( FrameImageCache& cache, const FrameImage& fi, float scale = GetScale() );
|
||||
|
||||
Reference in New Issue
Block a user