1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add checker for profiler availability.

This commit is contained in:
Bartosz Taudul
2020-06-24 01:32:57 +02:00
parent cf8620b956
commit 530e464347
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -863,7 +863,7 @@ static void CrashHandler( int signal, siginfo_t* info, void* /*ucontext*/ )
enum { QueuePrealloc = 256 * 1024 };
static Profiler* s_instance;
static Profiler* s_instance = nullptr;
static Thread* s_thread;
static Thread* s_compressThread;
@@ -871,6 +871,8 @@ static Thread* s_compressThread;
static Thread* s_sysTraceThread = nullptr;
#endif
TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
#ifdef TRACY_DELAYED_INIT
struct ThreadNameData;
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue();