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:
parent
468babe56a
commit
a795c21962
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user