COMMON: Restructuring how ApplicationSupport path is calculated and putting in Icons subdirectory

This commit is contained in:
Thunderforge 2022-06-30 13:21:42 -05:00 committed by Eugene Sandulenko
parent 5ee9618c15
commit 3e1d4ae9ce
3 changed files with 16 additions and 9 deletions

View file

@ -262,18 +262,13 @@ Common::String OSystem_MacOSX::getDefaultLogFileName() {
}
Common::String OSystem_MacOSX::getDefaultIconsPath() {
const char *prefix = getenv("HOME");
if (prefix == nullptr) {
const Common::String defaultIconsPath = getAppSupportPathMacOSX() + "/Icons";
if (!Posix::assureDirectoryExists(defaultIconsPath)) {
return Common::String();
}
const Common::String appSupportFolder = Common::String(prefix) + "/Library/Application Support/ScummVM";
if (!Posix::assureDirectoryExists(appSupportFolder)) {
return Common::String();
}
return appSupportFolder;
return defaultIconsPath;
}
Common::String OSystem_MacOSX::getScreenshotsPath() {