Indicate whether client is running on apple shitware.

This commit is contained in:
Bartosz Taudul 2019-06-13 14:05:15 +02:00
parent e05669a80f
commit ab4e99229d
2 changed files with 9 additions and 1 deletions

View File

@ -1047,6 +1047,12 @@ void Profiler::Worker()
uint8_t onDemand = 0;
#endif
#ifdef __APPLE__
uint8_t isApple = 1;
#else
uint8_t isApple = 0;
#endif
WelcomeMessage welcome;
MemWrite( &welcome.timerMul, m_timerMul );
MemWrite( &welcome.initBegin, GetInitTime() );
@ -1055,6 +1061,7 @@ void Profiler::Worker()
MemWrite( &welcome.resolution, m_resolution );
MemWrite( &welcome.epoch, m_epoch );
MemWrite( &welcome.onDemand, onDemand );
MemWrite( &welcome.isApple, isApple );
memcpy( welcome.programName, procname, pnsz );
memset( welcome.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );
memcpy( welcome.hostInfo, hostinfo, hisz );

View File

@ -9,7 +9,7 @@
namespace tracy
{
enum : uint32_t { ProtocolVersion = 7 };
enum : uint32_t { ProtocolVersion = 8 };
using lz4sz_t = uint32_t;
@ -64,6 +64,7 @@ struct WelcomeMessage
uint64_t resolution;
uint64_t epoch;
uint8_t onDemand;
uint8_t isApple;
char programName[WelcomeMessageProgramNameSize];
char hostInfo[WelcomeMessageHostInfoSize];
};