mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Merge branch 'unstable' of github.com:sm64ex-coop-dev/sm64ex-coop into unstable
This commit is contained in:
commit
d63d6a1ca5
1 changed files with 3 additions and 2 deletions
|
|
@ -175,8 +175,9 @@ const char* path_to_executable(void) {
|
||||||
}
|
}
|
||||||
GetModuleFileName(hModule, exePath, SYS_MAX_PATH-1);
|
GetModuleFileName(hModule, exePath, SYS_MAX_PATH-1);
|
||||||
#else
|
#else
|
||||||
snprintf(exePath, MAX_LAUNCH_CMD - 1, "/proc/%d/exe", getpid());
|
char procPath[SYS_MAX_PATH] = { 0 };
|
||||||
rc = readlink(exePath, cmd, MAX_LAUNCH_CMD - 1);
|
snprintf(procPath, SYS_MAX_PATH-1, "/proc/%d/exe", getpid());
|
||||||
|
s32 rc = readlink(procPath, exePath, SYS_MAX_PATH-1);
|
||||||
if (rc <= 0) {
|
if (rc <= 0) {
|
||||||
LOG_ERROR("unable to retrieve absolute exe path!");
|
LOG_ERROR("unable to retrieve absolute exe path!");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue