From db6ae4ef1bbb8abf12e6a0ab06db0539e042ac4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=AC=9B?= <1753894329@qq.com> Date: Thu, 28 Nov 2024 14:27:27 +0800 Subject: [PATCH] Shield functions not supported in EMSCRIPTEN environment --- public/client/TracyProfiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index a551aa42..bb7295d3 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1467,7 +1467,7 @@ Profiler::Profiler() m_safeSendBuffer = (char*)tracy_malloc( SafeSendBufferSize ); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) pipe(m_pipe); # if defined __APPLE__ || defined BSD // FreeBSD/XNU don't have F_SETPIPE_SZ, so use the default @@ -1480,7 +1480,7 @@ Profiler::Profiler() fcntl( m_pipe[1], F_SETFL, O_NONBLOCK ); #endif -#if !defined(TRACY_DELAYED_INIT) || !defined(TRACY_MANUAL_LIFETIME) +#if !defined(__EMSCRIPTEN__) && (!defined(TRACY_DELAYED_INIT) || !defined(TRACY_MANUAL_LIFETIME)) SpawnWorkerThreads(); #endif }