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

View File

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