diff --git a/src/libs/util/include/storm/fs.h b/src/libs/util/include/storm/fs.h index d1927f48c..da3ba3e70 100644 --- a/src/libs/util/include/storm/fs.h +++ b/src/libs/util/include/storm/fs.h @@ -2,7 +2,11 @@ #include +#ifdef _WIN32 // SHGetKnownFolderPath #include +#else +#include +#endif /* Filesystem proxy */ namespace fs @@ -14,11 +18,17 @@ inline path GetStashPath() static path path; if (path.empty()) { +#ifdef _WIN32 // SHGetKnownFolderPath wchar_t *str = nullptr; SHGetKnownFolderPath(FOLDERID_Documents, KF_FLAG_SIMPLE_IDLIST, nullptr, &str); path = str; path = path / "My Games" / "Sea Dogs"; CoTaskMemFree(str); +#else + char *pref_path = nullptr; + pref_path = SDL_GetPrefPath("Akella", "Sea Dogs"); + path = pref_path; +#endif } return path; }