mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Allow filtering zones in on-demand mode.
This commit is contained in:
@@ -17,7 +17,7 @@ class ScopedZone
|
||||
public:
|
||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, bool is_active = true )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
: m_active( is_active && s_profiler.IsConnected() )
|
||||
#else
|
||||
: m_active( is_active )
|
||||
#endif
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int depth, bool is_active = true )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
: m_active( is_active && s_profiler.IsConnected() )
|
||||
#else
|
||||
: m_active( is_active )
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user