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;
|
||||
static LogManager *m_logManager; // Singleton. Ugh.
|
||||
|
||||
public:
|
||||
LogManager();
|
||||
~LogManager();
|
||||
DISALLOW_COPY_AND_ASSIGN(LogManager);
|
||||
public:
|
||||
|
||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ SysConf::~SysConf()
|
|||
if (!m_IsValid)
|
||||
return;
|
||||
|
||||
Save();
|
||||
|
||||
for (size_t i = 0; i < m_Entries.size() - 1; i++)
|
||||
{
|
||||
delete [] m_Entries.at(i).data;
|
||||
|
@ -169,5 +171,7 @@ bool SysConf::SaveToFile(const char *filename)
|
|||
|
||||
bool SysConf::Save()
|
||||
{
|
||||
if (!m_IsValid)
|
||||
return false;
|
||||
return SaveToFile(m_Filename.c_str());
|
||||
}
|
||||
|
|
|
@ -23,23 +23,25 @@
|
|||
#include "PluginManager.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
SConfig SConfig::m_Instance;
|
||||
|
||||
SConfig* SConfig::m_Instance;
|
||||
|
||||
SConfig::SConfig()
|
||||
{
|
||||
// Make sure we have log manager
|
||||
LoadSettings();
|
||||
//Make sure we load settings
|
||||
LoadSettingsHLE();
|
||||
}
|
||||
|
||||
void SConfig::Init()
|
||||
{
|
||||
// Make sure we have log manager
|
||||
m_Instance.LoadSettings();
|
||||
//Make sure we load settings
|
||||
m_Instance.LoadSettingsHLE();
|
||||
m_Instance = new SConfig;
|
||||
}
|
||||
|
||||
void SConfig::Shutdown()
|
||||
{
|
||||
delete m_Instance;
|
||||
m_Instance = NULL;
|
||||
}
|
||||
|
||||
SConfig::~SConfig()
|
||||
|
|
|
@ -103,20 +103,22 @@ struct SConfig
|
|||
void LoadSettingsHLE();
|
||||
|
||||
// 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 Shutdown();
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
// constructor
|
||||
SConfig();
|
||||
// constructor
|
||||
SConfig();
|
||||
|
||||
// destructor
|
||||
~SConfig();
|
||||
// destructor
|
||||
~SConfig();
|
||||
|
||||
static SConfig m_Instance;
|
||||
static SConfig* m_Instance;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SConfig);
|
||||
};
|
||||
|
||||
#endif // endif config manager
|
||||
|
|
|
@ -86,6 +86,7 @@ private:
|
|||
void GetPluginInfo(CPluginInfo *&info, std::string Filename);
|
||||
void *LoadPlugin(const char *_rFilename);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CPluginManager);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ public:
|
|||
private:
|
||||
CDSPHandler();
|
||||
~CDSPHandler();
|
||||
DISALLOW_COPY_AND_ASSIGN(CDSPHandler);
|
||||
|
||||
// singleton instance
|
||||
static CDSPHandler* m_pInstance;
|
||||
|
|
Loading…
Reference in New Issue