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:
parent
71bfd15d9e
commit
e0a4b9c56a
@ -7,7 +7,7 @@ namespace Version
|
|||||||
{
|
{
|
||||||
enum { Major = 0 };
|
enum { Major = 0 };
|
||||||
enum { Minor = 3 };
|
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 );
|
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 ) )
|
if( fileVer >= FileVersion( 0, 3, 202 ) )
|
||||||
{
|
{
|
||||||
f.Read( sz );
|
f.Read( sz );
|
||||||
@ -2937,6 +2946,10 @@ void Worker::Write( FileWrite& f )
|
|||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
f.Write( m_captureName.c_str(), 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();
|
sz = m_data.frames.Data().size();
|
||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
for( auto& fd : m_data.frames.Data() )
|
for( auto& fd : m_data.frames.Data() )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user