From ab4e99229d2dd2ca3e8f0829788e48d4555ade83 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 13 Jun 2019 14:05:15 +0200 Subject: [PATCH] Indicate whether client is running on apple shitware. --- client/TracyProfiler.cpp | 7 +++++++ common/TracyProtocol.hpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 844011f5..b5923dcd 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -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 ); diff --git a/common/TracyProtocol.hpp b/common/TracyProtocol.hpp index cc59d2fb..bd18a379 100644 --- a/common/TracyProtocol.hpp +++ b/common/TracyProtocol.hpp @@ -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]; };