mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-24 03:58:24 +00:00
Add connection check when TRACY_ON_DEMAND for EnterFiber and LeaveFiber
This commit is contained in:
@@ -726,6 +726,9 @@ public:
|
||||
#ifdef TRACY_FIBERS
|
||||
static tracy_force_inline void EnterFiber( const char* fiber, int32_t groupHint )
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !GetProfiler().IsConnected() ) return;
|
||||
#endif
|
||||
TracyQueuePrepare( QueueType::FiberEnter );
|
||||
MemWrite( &item->fiberEnter.time, GetTime() );
|
||||
MemWrite( &item->fiberEnter.fiber, (uint64_t)fiber );
|
||||
@@ -735,6 +738,9 @@ public:
|
||||
|
||||
static tracy_force_inline void LeaveFiber()
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !GetProfiler().IsConnected() ) return;
|
||||
#endif
|
||||
TracyQueuePrepare( QueueType::FiberLeave );
|
||||
MemWrite( &item->fiberLeave.time, GetTime() );
|
||||
TracyQueueCommit( fiberLeave );
|
||||
|
||||
Reference in New Issue
Block a user