diff --git a/client/Tracy.hpp b/client/Tracy.hpp index ee5fd7b4..c8b87937 100755 --- a/client/Tracy.hpp +++ b/client/Tracy.hpp @@ -1,6 +1,13 @@ #ifndef __TRACY_HPP__ #define __TRACY_HPP__ +#ifdef TRACY_DISABLE + +#define ZoneScoped +#define FrameMark + +#else + #include "TracyProfiler.hpp" #include "TracyScoped.hpp" @@ -8,3 +15,5 @@ #define FrameMark tracy::Profiler::FrameMark(); #endif + +#endif diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 4fba38e2..e96686a9 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -32,6 +32,10 @@ static moodycamel::ProducerToken& GetToken() extern const char* PointerCheckA; const char* PointerCheckB = "tracy"; +#ifndef TRACY_DISABLE +Profiler s_profiler; +#endif + static Profiler* s_instance = nullptr; Profiler::Profiler()