mirror of https://github.com/mgba-emu/mgba.git
Core: Add portable.ini check for Haiku
This commit is contained in:
parent
3b0ff3ea56
commit
d9d299fb88
|
@ -232,7 +232,15 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
|
||||||
snprintf(out, outLength, "/%s", projectName);
|
snprintf(out, outLength, "/%s", projectName);
|
||||||
FSUSER_CreateDirectory(sdmcArchive, fsMakePath(PATH_ASCII, out), 0);
|
FSUSER_CreateDirectory(sdmcArchive, fsMakePath(PATH_ASCII, out), 0);
|
||||||
#elif defined(__HAIKU__)
|
#elif defined(__HAIKU__)
|
||||||
UNUSED(portable);
|
getcwd(out, outLength);
|
||||||
|
strncat(out, PATH_SEP "portable.ini", outLength - strlen(out));
|
||||||
|
portable = VFileOpen(out, O_RDONLY);
|
||||||
|
if (portable) {
|
||||||
|
getcwd(out, outLength);
|
||||||
|
portable->close(portable);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
char path[B_PATH_NAME_LENGTH];
|
char path[B_PATH_NAME_LENGTH];
|
||||||
find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, B_PATH_NAME_LENGTH);
|
find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, B_PATH_NAME_LENGTH);
|
||||||
snprintf(out, outLength, "%s/%s", path, binaryName);
|
snprintf(out, outLength, "%s/%s", path, binaryName);
|
||||||
|
|
Loading…
Reference in New Issue