Skip to content

Commit

Permalink
Merge pull request #14933 from unknownbrackets/memstick-dir
Browse files Browse the repository at this point in the history
Android: Create default folders in custom path
  • Loading branch information
hrydgard committed Sep 26, 2021
2 parents 166cc07 + f5ee1af commit 2adc3c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UI/NativeApp.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2adc3c6

Please sign in to comment.