mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add TracyIsStarted
When using TRACY_MANUAL_LIFETIME, calling most Tracy functions before starting the profiler results in an assertion. Notably, even TracyIsConnected is affected. There is, however, no function to check if the profiler had already started. This commit adds such a function.
This commit is contained in:
@@ -51,6 +51,10 @@ namespace tracy
|
||||
#if defined(TRACY_DELAYED_INIT) && defined(TRACY_MANUAL_LIFETIME)
|
||||
TRACY_API void StartupProfiler();
|
||||
TRACY_API void ShutdownProfiler();
|
||||
TRACY_API bool IsProfilerStarted();
|
||||
# define TracyIsStarted tracy::IsProfilerStarted()
|
||||
#else
|
||||
# define TracyIsStarted true
|
||||
#endif
|
||||
|
||||
class GpuCtx;
|
||||
|
||||
Reference in New Issue
Block a user