diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 61b06626..f4125651 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -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 ) { diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 6a9dc29d..ad3b237c 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -248,6 +248,7 @@ private: } Worker m_worker; + std::string m_filename; bool m_staticView; bool m_pause;