Android: Create default folders in custom path.

If scoped storage is off and the memstick directory was customized, load
it before pre-creating default folders.
This commit is contained in:
Unknown W. Brackets 2021-09-25 20:40:34 -07:00
parent 98c164296f
commit f5ee1af309

View file

@ -518,7 +518,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
} else {
g_Config.memStickDirectory = Path(external_dir);
g_Config.defaultCurrentDirectory = Path(external_dir);
CreateDirectoriesAndroid();
}
// Might also add an option to move it to internal / non-visible storage, but there's
@ -548,6 +547,11 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
INFO_LOG(SYSTEM, "No memstick directory file found (tried to open '%s')", memstickDirFile.c_str());
}
// Attempt to create directories after reading the path.
if (!System_GetPropertyBool(SYSPROP_ANDROID_SCOPED_STORAGE)) {
CreateDirectoriesAndroid();
}
#elif PPSSPP_PLATFORM(IOS)
g_Config.defaultCurrentDirectory = g_Config.internalDataDirectory;
g_Config.memStickDirectory = Path(user_data_path);