mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-26 04:11:36 +00:00
change to GetModuleFileNameW instead
This commit is contained in:
parent
51a34c98e7
commit
bb2947dd29
1 changed files with 4 additions and 1 deletions
|
|
@ -185,7 +185,10 @@ void SetWorkingDirectoryToExecutable()
|
||||||
std::filesystem::path exePath;
|
std::filesystem::path exePath;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
exePath = std::filesystem::canonical(std::filesystem::path(_pgmptr));
|
wchar_t path[MAX_PATH];
|
||||||
|
GetModuleFileNameW(NULL, path, sizeof(path));
|
||||||
|
|
||||||
|
exePath = path;
|
||||||
#else
|
#else
|
||||||
exePath = std::filesystem::canonical("/proc/self/exe");
|
exePath = std::filesystem::canonical("/proc/self/exe");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue