mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Save/load host info.
This commit is contained in:
parent
71bfd15d9e
commit
e0a4b9c56a
@ -7,7 +7,7 @@ namespace Version
|
||||
{
|
||||
enum { Major = 0 };
|
||||
enum { Minor = 3 };
|
||||
enum { Patch = 202 };
|
||||
enum { Patch = 203 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() )
|
||||
|
Loading…
Reference in New Issue
Block a user