1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Save/load host info.

This commit is contained in:
Bartosz Taudul
2018-08-19 18:28:48 +02:00
parent 71bfd15d9e
commit e0a4b9c56a
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -276,6 +276,15 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
m_captureName = std::string( tmp, tmp+sz );
}
if( fileVer >= FileVersion( 0, 3, 203 ) )
{
f.Read( sz );
assert( sz < 1024 );
char tmp[1024];
f.Read( tmp, sz );
m_hostInfo = std::string( tmp, tmp+sz );
}
if( fileVer >= FileVersion( 0, 3, 202 ) )
{
f.Read( sz );
@@ -2937,6 +2946,10 @@ void Worker::Write( FileWrite& f )
f.Write( &sz, sizeof( sz ) );
f.Write( m_captureName.c_str(), sz );
sz = m_hostInfo.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_hostInfo.c_str(), sz );
sz = m_data.frames.Data().size();
f.Write( &sz, sizeof( sz ) );
for( auto& fd : m_data.frames.Data() )