mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Expose m_isConnected in non-on-demand builds.
This commit is contained in:
parent
d614dbeda3
commit
b8df7a1302
@ -1057,8 +1057,8 @@ Profiler::Profiler()
|
||||
, m_fiQueue( 16 )
|
||||
, m_fiDequeue( 16 )
|
||||
, m_frameCount( 0 )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
, m_isConnected( false )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
, m_connectionId( 0 )
|
||||
, m_deferredQueue( 64*1024 )
|
||||
#endif
|
||||
@ -1391,8 +1391,8 @@ void Profiler::Worker()
|
||||
const auto currentTime = GetTime();
|
||||
ClearQueues( token );
|
||||
m_connectionId.fetch_add( 1, std::memory_order_release );
|
||||
m_isConnected.store( true, std::memory_order_release );
|
||||
#endif
|
||||
m_isConnected.store( true, std::memory_order_release );
|
||||
|
||||
HandshakeStatus handshake = HandshakeWelcome;
|
||||
m_sock->Send( &handshake, sizeof( handshake ) );
|
||||
@ -1482,8 +1482,8 @@ void Profiler::Worker()
|
||||
}
|
||||
if( ShouldExit() ) break;
|
||||
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
m_isConnected.store( false, std::memory_order_release );
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
m_bufferOffset = 0;
|
||||
m_bufferStart = 0;
|
||||
#endif
|
||||
|
@ -451,12 +451,12 @@ public:
|
||||
|
||||
static bool ShouldExit();
|
||||
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
tracy_force_inline bool IsConnected() const
|
||||
{
|
||||
return m_isConnected.load( std::memory_order_acquire );
|
||||
}
|
||||
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
tracy_force_inline uint64_t ConnectionId() const
|
||||
{
|
||||
return m_connectionId.load( std::memory_order_acquire );
|
||||
@ -667,8 +667,8 @@ private:
|
||||
TracyMutex m_fiLock;
|
||||
|
||||
std::atomic<uint64_t> m_frameCount;
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
std::atomic<bool> m_isConnected;
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
std::atomic<uint64_t> m_connectionId;
|
||||
|
||||
TracyMutex m_deferredLock;
|
||||
|
Loading…
Reference in New Issue
Block a user