1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Get process executable path on macos.

This commit is contained in:
Bartosz Taudul 2021-01-31 19:34:39 +01:00
parent 468babe56a
commit a795c21962

View File

@ -39,6 +39,7 @@
#if defined __APPLE__
# include "TargetConditionals.h"
# include <mach-o/dyld.h>
#endif
#ifdef __ANDROID__
@ -287,6 +288,11 @@ static const char* GetProcessExecutablePath()
return buf;
#elif defined _GNU_SOURCE || defined __CYGWIN__
return program_invocation_name;
#elif defined __APPLE__
static char buf[1024];
uint32_t size = 1024;
_NSGetExecutablePath( buf, &size );
return buf;
#else
return nullptr;
#endif