Revert the SysConf change, since it was intended by shuffle.
Attempt to fix some of our singleton failures. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5085 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f41686e926
commit
368cce2ec2
|
@ -117,9 +117,10 @@ private:
|
||||||
ConsoleListener *m_consoleLog;
|
ConsoleListener *m_consoleLog;
|
||||||
static LogManager *m_logManager; // Singleton. Ugh.
|
static LogManager *m_logManager; // Singleton. Ugh.
|
||||||
|
|
||||||
public:
|
|
||||||
LogManager();
|
LogManager();
|
||||||
~LogManager();
|
~LogManager();
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(LogManager);
|
||||||
|
public:
|
||||||
|
|
||||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ SysConf::~SysConf()
|
||||||
if (!m_IsValid)
|
if (!m_IsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Save();
|
||||||
|
|
||||||
for (size_t i = 0; i < m_Entries.size() - 1; i++)
|
for (size_t i = 0; i < m_Entries.size() - 1; i++)
|
||||||
{
|
{
|
||||||
delete [] m_Entries.at(i).data;
|
delete [] m_Entries.at(i).data;
|
||||||
|
@ -169,5 +171,7 @@ bool SysConf::SaveToFile(const char *filename)
|
||||||
|
|
||||||
bool SysConf::Save()
|
bool SysConf::Save()
|
||||||
{
|
{
|
||||||
|
if (!m_IsValid)
|
||||||
|
return false;
|
||||||
return SaveToFile(m_Filename.c_str());
|
return SaveToFile(m_Filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,23 +23,25 @@
|
||||||
#include "PluginManager.h"
|
#include "PluginManager.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
|
|
||||||
SConfig SConfig::m_Instance;
|
SConfig* SConfig::m_Instance;
|
||||||
|
|
||||||
|
|
||||||
SConfig::SConfig()
|
SConfig::SConfig()
|
||||||
{
|
{
|
||||||
|
// Make sure we have log manager
|
||||||
|
LoadSettings();
|
||||||
|
//Make sure we load settings
|
||||||
|
LoadSettingsHLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::Init()
|
void SConfig::Init()
|
||||||
{
|
{
|
||||||
// Make sure we have log manager
|
m_Instance = new SConfig;
|
||||||
m_Instance.LoadSettings();
|
|
||||||
//Make sure we load settings
|
|
||||||
m_Instance.LoadSettingsHLE();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::Shutdown()
|
void SConfig::Shutdown()
|
||||||
{
|
{
|
||||||
|
delete m_Instance;
|
||||||
|
m_Instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SConfig::~SConfig()
|
SConfig::~SConfig()
|
||||||
|
|
|
@ -103,20 +103,22 @@ struct SConfig
|
||||||
void LoadSettingsHLE();
|
void LoadSettingsHLE();
|
||||||
|
|
||||||
// Return the permanent and somewhat globally used instance of this struct
|
// Return the permanent and somewhat globally used instance of this struct
|
||||||
static SConfig& GetInstance() {return(m_Instance);}
|
static SConfig& GetInstance() {return(*m_Instance);}
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
SConfig();
|
SConfig();
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
~SConfig();
|
~SConfig();
|
||||||
|
|
||||||
static SConfig m_Instance;
|
static SConfig* m_Instance;
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(SConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // endif config manager
|
#endif // endif config manager
|
||||||
|
|
|
@ -86,6 +86,7 @@ private:
|
||||||
void GetPluginInfo(CPluginInfo *&info, std::string Filename);
|
void GetPluginInfo(CPluginInfo *&info, std::string Filename);
|
||||||
void *LoadPlugin(const char *_rFilename);
|
void *LoadPlugin(const char *_rFilename);
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(CPluginManager);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ public:
|
||||||
private:
|
private:
|
||||||
CDSPHandler();
|
CDSPHandler();
|
||||||
~CDSPHandler();
|
~CDSPHandler();
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(CDSPHandler);
|
||||||
|
|
||||||
// singleton instance
|
// singleton instance
|
||||||
static CDSPHandler* m_pInstance;
|
static CDSPHandler* m_pInstance;
|
||||||
|
|
Loading…
Reference in New Issue