1
0
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:
Ivan Molodetskikh
2023-10-25 13:53:37 +04:00
parent 18054b4f34
commit 852a1a5f14
4 changed files with 23 additions and 0 deletions
+4
View File
@@ -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;