mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
Android: Extract Sys to a different folder than the User folder
This commit is contained in:
parent
d1c1793a34
commit
b3b7aef09a
7 changed files with 96 additions and 54 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
|
@ -52,6 +53,10 @@
|
|||
// REMEMBER: strdup considered harmful!
|
||||
namespace File
|
||||
{
|
||||
#ifdef ANDROID
|
||||
static std::string s_android_sys_directory;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
FileInfo::FileInfo(const std::string& path)
|
||||
{
|
||||
|
@ -696,8 +701,6 @@ std::string GetSysDirectory()
|
|||
#define SYSDATA_DIR "Sys"
|
||||
#elif defined __APPLE__
|
||||
#define SYSDATA_DIR "Contents/Resources/Sys"
|
||||
#elif defined ANDROID
|
||||
#define SYSDATA_DIR "/sdcard/dolphin-emu"
|
||||
#else
|
||||
#ifdef DATA_DIR
|
||||
#define SYSDATA_DIR DATA_DIR "sys"
|
||||
|
@ -710,6 +713,9 @@ std::string GetSysDirectory()
|
|||
sysDir = GetBundleDirectory() + DIR_SEP + SYSDATA_DIR;
|
||||
#elif defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
||||
sysDir = GetExeDirectory() + DIR_SEP + SYSDATA_DIR;
|
||||
#elif defined ANDROID
|
||||
sysDir = s_android_sys_directory;
|
||||
_assert_msg_(COMMON, !sysDir.empty(), "Sys directory has not been set");
|
||||
#else
|
||||
sysDir = SYSDATA_DIR;
|
||||
#endif
|
||||
|
@ -719,6 +725,14 @@ std::string GetSysDirectory()
|
|||
return sysDir;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
void SetSysDirectory(const std::string& path)
|
||||
{
|
||||
INFO_LOG(COMMON, "Setting Sys directory to %s", path.c_str());
|
||||
s_android_sys_directory = path;
|
||||
}
|
||||
#endif
|
||||
|
||||
static std::string s_user_paths[NUM_PATH_INDICES];
|
||||
static void RebuildUserDirectories(unsigned int dir_index)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue