Track trace file name in TracyView.

This commit is contained in:
Bartosz Taudul 2019-10-07 21:34:10 +02:00
parent c6f320d2d8
commit 4c4099877d
2 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,7 @@ View::View( const char* addr, int port, ImFont* fixedWidth, ImFont* smallFont, I
View::View( FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb )
: m_worker( f )
, m_filename( f.GetFilename() )
, m_staticView( true )
, m_pause( true )
, m_frames( m_worker.GetFramesBase() )
@ -945,10 +946,12 @@ bool View::DrawConnection()
char tmp[1024];
sprintf( tmp, "%s.tracy", fn );
f.reset( FileWrite::Open( tmp ) );
if( f ) m_filename = tmp;
}
else
{
f.reset( FileWrite::Open( fn ) );
if( f ) m_filename = fn;
}
if( f )
{

View File

@ -248,6 +248,7 @@ private:
}
Worker m_worker;
std::string m_filename;
bool m_staticView;
bool m_pause;