mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
(FreeBSD) Added fallback method to locate binary
This commit is contained in:
parent
338843ce46
commit
bd6956d52f
|
@ -375,6 +375,14 @@ namespace Utils
|
|||
esBinary = exePath;
|
||||
exePath = getCanonicalPath(exePath);
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
// Fallback to getPathToBinary(argv[0]), needed as FreeBSD does not typically
|
||||
// provide /proc/self/exe.
|
||||
if (exePath.empty()) {
|
||||
esBinary = getPathToBinary(path);
|
||||
exePath = getCanonicalPath(esBinary);
|
||||
}
|
||||
#endif
|
||||
// Fallback to argv[0] if everything else fails.
|
||||
if (exePath.empty()) {
|
||||
esBinary = path;
|
||||
|
|
Loading…
Reference in a new issue