Core: Add portable.ini check for Haiku

This commit is contained in:
Crestwave 2020-03-01 10:09:34 +08:00 committed by Vicki Pfau
parent 3b0ff3ea56
commit d9d299fb88
1 changed files with 9 additions and 1 deletions

View File

@ -232,7 +232,15 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
snprintf(out, outLength, "/%s", projectName);
FSUSER_CreateDirectory(sdmcArchive, fsMakePath(PATH_ASCII, out), 0);
#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];
find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, B_PATH_NAME_LENGTH);
snprintf(out, outLength, "%s/%s", path, binaryName);