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
|
@ -512,14 +512,23 @@ bool SetCurrentDir(const char *_rDirectory)
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
|
||||||
//get the full config dir
|
//get the full config dir
|
||||||
char *GetConfigDirectory()
|
const char *GetConfigDirectory()
|
||||||
{
|
{
|
||||||
|
|
||||||
static char path[MAX_PATH] = {0};
|
static char path[MAX_PATH] = {0};
|
||||||
if (strlen(path) > 0)
|
if (strlen(path) > 0)
|
||||||
return path;
|
return path;
|
||||||
snprintf(path, sizeof(path), "%s" DIR_SEP CONFIG_FILE, GetUserDirectory());
|
snprintf(path, sizeof(path), "%s" DIR_SEP CONFIG_FILE, GetUserDirectory());
|
||||||
return path;
|
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__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
char *GetConfigDirectory();
|
const char *GetConfigDirectory();
|
||||||
|
const char *GetSysConfDirectory();
|
||||||
|
|
||||||
std::string GetBundleDirectory();
|
std::string GetBundleDirectory();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
SysConf::SysConf()
|
SysConf::SysConf()
|
||||||
: m_IsValid(false)
|
: m_IsValid(false)
|
||||||
{
|
{
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
if (LoadFromFile(File::GetSysConfDirectory()))
|
||||||
|
#else
|
||||||
if (LoadFromFile(WII_SYSCONF_FILE))
|
if (LoadFromFile(WII_SYSCONF_FILE))
|
||||||
|
#endif
|
||||||
m_IsValid = true;
|
m_IsValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,14 @@ static u64 DOL_ADDRESS = 0;
|
||||||
|
|
||||||
CVolumeDirectory::CVolumeDirectory(const std::string& _rDirectory, bool _bIsWii,
|
CVolumeDirectory::CVolumeDirectory(const std::string& _rDirectory, bool _bIsWii,
|
||||||
const std::string& _rApploader, const std::string& _rDOL)
|
const std::string& _rApploader, const std::string& _rDOL)
|
||||||
: m_apploaderSize(0)
|
: m_totalNameSize(0)
|
||||||
, m_apploader(NULL)
|
|
||||||
, m_DOLSize(0)
|
|
||||||
, m_DOL(NULL)
|
|
||||||
, m_totalNameSize(0)
|
|
||||||
, m_dataStartAddress(-1)
|
, m_dataStartAddress(-1)
|
||||||
, m_fstSize(0)
|
, m_fstSize(0)
|
||||||
, m_FSTData(NULL)
|
, m_FSTData(NULL)
|
||||||
|
, m_apploaderSize(0)
|
||||||
|
, m_apploader(NULL)
|
||||||
|
, m_DOLSize(0)
|
||||||
|
, m_DOL(NULL)
|
||||||
{
|
{
|
||||||
m_rootDirectory = ExtractDirectoryName(_rDirectory);
|
m_rootDirectory = ExtractDirectoryName(_rDirectory);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue