mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Get process executable path on macos.
This commit is contained in:
parent
468babe56a
commit
a795c21962
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#if defined __APPLE__
|
#if defined __APPLE__
|
||||||
# include "TargetConditionals.h"
|
# include "TargetConditionals.h"
|
||||||
|
# include <mach-o/dyld.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
@ -287,6 +288,11 @@ static const char* GetProcessExecutablePath()
|
|||||||
return buf;
|
return buf;
|
||||||
#elif defined _GNU_SOURCE || defined __CYGWIN__
|
#elif defined _GNU_SOURCE || defined __CYGWIN__
|
||||||
return program_invocation_name;
|
return program_invocation_name;
|
||||||
|
#elif defined __APPLE__
|
||||||
|
static char buf[1024];
|
||||||
|
uint32_t size = 1024;
|
||||||
|
_NSGetExecutablePath( buf, &size );
|
||||||
|
return buf;
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user