mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-31 06:38:01 +00:00
Fixes Issue 2176 (SysConf on OSX), plus some initialization order warning fix in VolumeDirectory.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4985 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8b129fca0c
commit
e282d5c7f2
4 changed files with 22 additions and 8 deletions
|
@ -512,14 +512,23 @@ bool SetCurrentDir(const char *_rDirectory)
|
|||
#if defined(__APPLE__)
|
||||
|
||||
//get the full config dir
|
||||
char *GetConfigDirectory()
|
||||
const char *GetConfigDirectory()
|
||||
{
|
||||
|
||||
static char path[MAX_PATH] = {0};
|
||||
if (strlen(path) > 0)
|
||||
return path;
|
||||
snprintf(path, sizeof(path), "%s" DIR_SEP CONFIG_FILE, GetUserDirectory());
|
||||
return path;
|
||||
}
|
||||
|
||||
//get the full SYSCONF dir
|
||||
const char *GetSysConfDirectory()
|
||||
{
|
||||
static char path[MAX_PATH] = {0};
|
||||
if (strlen(path) > 0)
|
||||
return path;
|
||||
snprintf(path, sizeof(path), "%s" DIR_SEP WII_SYSCONF_FILE, GetUserDirectory());
|
||||
return path;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,8 @@ std::string GetSysDirectory();
|
|||
|
||||
#ifdef __APPLE__
|
||||
|
||||
char *GetConfigDirectory();
|
||||
const char *GetConfigDirectory();
|
||||
const char *GetSysConfDirectory();
|
||||
|
||||
std::string GetBundleDirectory();
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,11 @@
|
|||
SysConf::SysConf()
|
||||
: m_IsValid(false)
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
if (LoadFromFile(File::GetSysConfDirectory()))
|
||||
#else
|
||||
if (LoadFromFile(WII_SYSCONF_FILE))
|
||||
#endif
|
||||
m_IsValid = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue