mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-29 08:44:55 +00:00
Merge pull request #10703 from Dentomologist/remove_getsysdirectory_spam
Remove GetSysDirectory spam
This commit is contained in:
commit
fc6ba6b686
2 changed files with 17 additions and 12 deletions
|
@ -885,10 +885,8 @@ std::string GetExeDirectory()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetSysDirectory()
|
static std::string CreateSysDirectoryPath()
|
||||||
{
|
{
|
||||||
std::string sysDir;
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
#if defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
||||||
#define SYSDATA_DIR "Sys"
|
#define SYSDATA_DIR "Sys"
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
@ -902,25 +900,32 @@ std::string GetSysDirectory()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
sysDir = GetBundleDirectory() + DIR_SEP + SYSDATA_DIR;
|
const std::string sys_directory = GetBundleDirectory() + DIR_SEP SYSDATA_DIR DIR_SEP;
|
||||||
#elif defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
#elif defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
||||||
sysDir = GetExeDirectory() + DIR_SEP + SYSDATA_DIR;
|
const std::string sys_directory = GetExeDirectory() + DIR_SEP SYSDATA_DIR DIR_SEP;
|
||||||
#elif defined ANDROID
|
#elif defined ANDROID
|
||||||
sysDir = s_android_sys_directory;
|
const std::string sys_directory = s_android_sys_directory + DIR_SEP;
|
||||||
ASSERT_MSG(COMMON, !sysDir.empty(), "Sys directory has not been set");
|
ASSERT_MSG(COMMON, !s_android_sys_directory.empty(), "Sys directory has not been set");
|
||||||
#else
|
#else
|
||||||
sysDir = SYSDATA_DIR;
|
const std::string sys_directory = SYSDATA_DIR DIR_SEP;
|
||||||
#endif
|
#endif
|
||||||
sysDir += DIR_SEP;
|
|
||||||
|
|
||||||
INFO_LOG_FMT(COMMON, "GetSysDirectory: Setting to {}:", sysDir);
|
INFO_LOG_FMT(COMMON, "CreateSysDirectoryPath: Setting to {}", sys_directory);
|
||||||
return sysDir;
|
return sys_directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string& GetSysDirectory()
|
||||||
|
{
|
||||||
|
static const std::string sys_directory = CreateSysDirectoryPath();
|
||||||
|
return sys_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
void SetSysDirectory(const std::string& path)
|
void SetSysDirectory(const std::string& path)
|
||||||
{
|
{
|
||||||
INFO_LOG_FMT(COMMON, "Setting Sys directory to {}", path);
|
INFO_LOG_FMT(COMMON, "Setting Sys directory to {}", path);
|
||||||
|
ASSERT_MSG(COMMON, s_android_sys_directory.empty(), "Sys directory already set to {}",
|
||||||
|
s_android_sys_directory);
|
||||||
s_android_sys_directory = path;
|
s_android_sys_directory = path;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -215,7 +215,7 @@ void SetUserPath(unsigned int dir_index, std::string path);
|
||||||
std::string GetThemeDir(const std::string& theme_name);
|
std::string GetThemeDir(const std::string& theme_name);
|
||||||
|
|
||||||
// Returns the path to where the sys file are
|
// Returns the path to where the sys file are
|
||||||
std::string GetSysDirectory();
|
const std::string& GetSysDirectory();
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
void SetSysDirectory(const std::string& path);
|
void SetSysDirectory(const std::string& path);
|
||||||
|
|
Loading…
Add table
Reference in a new issue