Add Haiku support

This commit is contained in:
hfsfox 2023-09-22 01:42:35 +03:00
parent fb420bb563
commit bc99d986f2
5 changed files with 27 additions and 1 deletions

View file

@ -136,6 +136,14 @@ namespace fs {
dataDir = (home != NULL && strlen(home) > 0) ? home : "";
dataDir += "/Library/Application Support/" + appName;
return;
#elif defined(__HAIKU__)
char *home = getenv("HOME");
if (home != NULL && strlen(home) > 0) {
dataDir = std::string(home) + "/config/settings/" + appName;
} else {
dataDir = "/tmp/" + appName;
}
return;
#else /* other unix */
#if defined(ANDROID)
const char * ext = getenv("EXTERNAL_STORAGE");