Android: Allow using custom storage paths.

This allows a user to keep their save data on an insertable card, or
otherwise.  Currently, the UI isn't great - errors are easy to miss,
and the path must be typed manually.
This commit is contained in:
Unknown W. Brackets committed 2019-02-18 09:15:15 -08:00
1 parent a29fe3f46e
commit 1e943549c2
3 files changed
+99 -3

No files matched your search

+9
View File
@@ -466,6 +466,15 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
// most sense.
g_Config.memStickDirectory = std::string(external_dir) + "/";
g_Config.flash0Directory = std::string(external_dir) + "/flash0/";
std::string memstickDirFile = g_Config.internalDataDirectory + "/memstick_dir.txt";
if (File::Exists(memstickDirFile)) {
std::string memstickDir;
readFileToString(true, memstickDirFile.c_str(), memstickDir);
if (!memstickDir.empty() && File::Exists(memstickDir)) {
g_Config.memStickDirectory = memstickDir + "/";
}
}
#elif defined(IOS)
g_Config.memStickDirectory = user_data_path;
g_Config.flash0Directory = std::string(external_dir) + "/flash0/";