diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 5cff7cc55c..86eada6035 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -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; } diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h index c4a4abd2a7..728ad46f8a 100644 --- a/Source/Core/Common/Src/FileUtil.h +++ b/Source/Core/Common/Src/FileUtil.h @@ -94,7 +94,8 @@ std::string GetSysDirectory(); #ifdef __APPLE__ -char *GetConfigDirectory(); +const char *GetConfigDirectory(); +const char *GetSysConfDirectory(); std::string GetBundleDirectory(); #endif diff --git a/Source/Core/Common/Src/SysConf.cpp b/Source/Core/Common/Src/SysConf.cpp index 38c4f6f549..13fb688a0d 100644 --- a/Source/Core/Common/Src/SysConf.cpp +++ b/Source/Core/Common/Src/SysConf.cpp @@ -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; } diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index 396788668c..ec26a6a549 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -35,14 +35,14 @@ static u64 DOL_ADDRESS = 0; CVolumeDirectory::CVolumeDirectory(const std::string& _rDirectory, bool _bIsWii, const std::string& _rApploader, const std::string& _rDOL) - : m_apploaderSize(0) - , m_apploader(NULL) - , m_DOLSize(0) - , m_DOL(NULL) - , m_totalNameSize(0) + : m_totalNameSize(0) , m_dataStartAddress(-1) , m_fstSize(0) , m_FSTData(NULL) + , m_apploaderSize(0) + , m_apploader(NULL) + , m_DOLSize(0) + , m_DOL(NULL) { m_rootDirectory = ExtractDirectoryName(_rDirectory);