fix a small oversight to changing NAND root, update locations of content.map and uid.sys
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7587 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
450b5c9c33
commit
2c4bc6d94c
|
@ -28,9 +28,20 @@
|
|||
|
||||
namespace DiscIO
|
||||
{
|
||||
CSharedContent *CSharedContent::m_Instance = NULL;
|
||||
cUIDsys *cUIDsys::m_Instance = NULL;
|
||||
|
||||
CSharedContent CSharedContent::m_Instance;
|
||||
cUIDsys cUIDsys::m_Instance;
|
||||
CSharedContent& CSharedContent::AccessInstance()
|
||||
{
|
||||
if (!m_Instance) m_Instance = new CSharedContent;
|
||||
return *m_Instance;
|
||||
}
|
||||
|
||||
void CSharedContent::UpdateLocation()
|
||||
{
|
||||
delete m_Instance;
|
||||
m_Instance = new CSharedContent;
|
||||
}
|
||||
|
||||
CSharedContent::CSharedContent()
|
||||
{
|
||||
|
@ -47,7 +58,10 @@ CSharedContent::CSharedContent()
|
|||
}
|
||||
|
||||
CSharedContent::~CSharedContent()
|
||||
{}
|
||||
{
|
||||
delete m_Instance;
|
||||
m_Instance = NULL;
|
||||
}
|
||||
|
||||
std::string CSharedContent::GetFilenameFromSHA1(u8* _pHash)
|
||||
{
|
||||
|
@ -395,6 +409,18 @@ void CNANDContentLoader::RemoveTitle() const
|
|||
}
|
||||
}
|
||||
|
||||
cUIDsys& cUIDsys::AccessInstance()
|
||||
{
|
||||
if (!m_Instance) m_Instance = new cUIDsys;
|
||||
return *m_Instance;
|
||||
}
|
||||
|
||||
void cUIDsys::UpdateLocation()
|
||||
{
|
||||
delete m_Instance;
|
||||
m_Instance = new cUIDsys;
|
||||
}
|
||||
|
||||
cUIDsys::cUIDsys()
|
||||
{
|
||||
sprintf(uidSys, "%ssys/uid.sys", File::GetUserPath(D_WIIUSER_IDX).c_str());
|
||||
|
@ -422,7 +448,10 @@ cUIDsys::cUIDsys()
|
|||
}
|
||||
|
||||
cUIDsys::~cUIDsys()
|
||||
{}
|
||||
{
|
||||
delete m_Instance;
|
||||
m_Instance = NULL;
|
||||
}
|
||||
|
||||
u32 cUIDsys::GetUIDFromTitle(u64 _Title)
|
||||
{
|
||||
|
|
|
@ -106,7 +106,8 @@ class CSharedContent
|
|||
{
|
||||
public:
|
||||
|
||||
static CSharedContent& AccessInstance() { return m_Instance; }
|
||||
static CSharedContent& AccessInstance();
|
||||
static void UpdateLocation();
|
||||
|
||||
std::string GetFilenameFromSHA1(u8* _pHash);
|
||||
std::string AddSharedContent(u8* _pHash);
|
||||
|
@ -129,14 +130,15 @@ private:
|
|||
u32 lastID;
|
||||
char contentMap[1024];
|
||||
std::vector<SElement> m_Elements;
|
||||
static CSharedContent m_Instance;
|
||||
static CSharedContent *m_Instance;
|
||||
};
|
||||
|
||||
class cUIDsys
|
||||
{
|
||||
public:
|
||||
|
||||
static cUIDsys& AccessInstance() { return m_Instance; }
|
||||
static cUIDsys& AccessInstance();
|
||||
static void UpdateLocation();
|
||||
|
||||
u32 GetUIDFromTitle(u64 _Title);
|
||||
void AddTitle(u64 _Title);
|
||||
|
@ -158,7 +160,7 @@ private:
|
|||
u32 lastUID;
|
||||
char uidSys[1024];
|
||||
std::vector<SElement> m_Elements;
|
||||
static cUIDsys m_Instance;
|
||||
static cUIDsys *m_Instance;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "HW/DSPHLE/DSPHLE.h"
|
||||
#include "HW/DSPLLE/DSPLLE.h"
|
||||
#include "IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "NANDContentLoader.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "ConfigMain.h"
|
||||
|
@ -1202,6 +1203,8 @@ void CConfigMain::NANDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
|||
SConfig::GetInstance().m_NANDPath = File::GetUserPath(D_WIIROOT_IDX, std::string(NANDRoot->GetPath().mb_str()));
|
||||
NANDRoot->SetPath(wxString(NANDPath.c_str(), *wxConvCurrent));
|
||||
SConfig::GetInstance().m_SYSCONF->UpdateLocation();
|
||||
DiscIO::cUIDsys::UpdateLocation();
|
||||
DiscIO::CSharedContent::UpdateLocation();
|
||||
main_frame->UpdateWiiMenuChoice();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue