android: common: file_util: Add user_path, ConfigDir, and CacheDir.
This commit is contained in:
parent
1c61f066d1
commit
bf8224213d
|
@ -683,7 +683,11 @@ void SetUserPath(const std::string& path) {
|
||||||
g_paths.emplace(UserPath::ConfigDir, user_path + CONFIG_DIR DIR_SEP);
|
g_paths.emplace(UserPath::ConfigDir, user_path + CONFIG_DIR DIR_SEP);
|
||||||
g_paths.emplace(UserPath::CacheDir, user_path + CACHE_DIR DIR_SEP);
|
g_paths.emplace(UserPath::CacheDir, user_path + CACHE_DIR DIR_SEP);
|
||||||
#elif ANDROID
|
#elif ANDROID
|
||||||
ASSERT_MSG(false, "Specified path {} is not valid", path);
|
if (FileUtil::Exists(ROOT_DIR DIR_SEP SDCARD_DIR)) {
|
||||||
|
user_path = ROOT_DIR DIR_SEP SDCARD_DIR DIR_SEP EMU_DATA_DIR DIR_SEP;
|
||||||
|
g_paths.emplace(UserPath::ConfigDir, user_path + CONFIG_DIR DIR_SEP);
|
||||||
|
g_paths.emplace(UserPath::CacheDir, user_path + CACHE_DIR DIR_SEP);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (FileUtil::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) {
|
if (FileUtil::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) {
|
||||||
user_path = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
|
user_path = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
|
||||||
|
|
Reference in New Issue