Fix building Tracy for Switch
This commit is contained in:
@@ -1480,7 +1480,7 @@ Profiler::Profiler()
|
||||
|
||||
m_safeSendBuffer = (char*)tracy_malloc( SafeSendBufferSize );
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef TRACY_NO_PIPE
|
||||
pipe(m_pipe);
|
||||
# if defined __APPLE__ || defined BSD
|
||||
// FreeBSD/XNU don't have F_SETPIPE_SZ, so use the default
|
||||
@@ -1642,7 +1642,7 @@ Profiler::~Profiler()
|
||||
tracy_free( m_kcore );
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef TRACY_NO_PIPE
|
||||
close( m_pipe[0] );
|
||||
close( m_pipe[1] );
|
||||
#endif
|
||||
@@ -3139,6 +3139,8 @@ char* Profiler::SafeCopyProlog( const char* data, size_t size )
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
#elif !defined(TRACY_NO_PIPE)
|
||||
memcpy(buf, data, size);
|
||||
#else
|
||||
// Send through the pipe to ensure safe reads
|
||||
for( size_t offset = 0; offset != size; /*in loop*/ )
|
||||
|
||||
4
Source/ThirdParty/tracy/tracy.Build.cs
vendored
4
Source/ThirdParty/tracy/tracy.Build.cs
vendored
@@ -47,11 +47,15 @@ public class tracy : ThirdPartyModule
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.PrivateDefinitions.Add("TRACY_DBGHELP_LOCK=FlaxDbgHelp");
|
||||
options.PrivateDefinitions.Add("TRACY_NO_PIPE");
|
||||
break;
|
||||
case TargetPlatform.Switch:
|
||||
options.PrivateDefinitions.Add("TRACY_USE_MALLOC");
|
||||
options.PrivateDefinitions.Add("TRACY_ONLY_IPV4");
|
||||
options.PrivateDefinitions.Add("TRACY_NO_PIPE");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user