Fixed the save file path issue of r4613
Anyone encounters significant FPS drop (comparing to r4611 or earlier) please report git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4614 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7a6241da81
commit
fddab016fa
|
@ -89,7 +89,6 @@ void Init()
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_immediate(i, std::string("/dev/stm/immediate")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_immediate(i, std::string("/dev/stm/immediate")); i++;
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_eventhook(i, std::string("/dev/stm/eventhook")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_eventhook(i, std::string("/dev/stm/eventhook")); i++;
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_fs(i, std::string("/dev/fs")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_fs(i, std::string("/dev/fs")); i++;
|
||||||
// Warning: "/dev/es" must be created after "/dev/fs", not before
|
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_es(i, std::string("/dev/es")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_es(i, std::string("/dev/es")); i++;
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_di(i, std::string("/dev/di")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_di(i, std::string("/dev/di")); i++;
|
||||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_kd_request(i, std::string("/dev/net/kd/request")); i++;
|
g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_kd_request(i, std::string("/dev/net/kd/request")); i++;
|
||||||
|
@ -140,7 +139,7 @@ void SetDefaultContentFile(const std::string& _rFilename)
|
||||||
{
|
{
|
||||||
CWII_IPC_HLE_Device_es* pDevice = (CWII_IPC_HLE_Device_es*)AccessDeviceByID(GetDeviceIDByName(std::string("/dev/es")));
|
CWII_IPC_HLE_Device_es* pDevice = (CWII_IPC_HLE_Device_es*)AccessDeviceByID(GetDeviceIDByName(std::string("/dev/es")));
|
||||||
if (pDevice)
|
if (pDevice)
|
||||||
pDevice->Load(_rFilename);
|
pDevice->LoadWAD(_rFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GetDeviceIDByName(const std::string& _rDeviceName)
|
u32 GetDeviceIDByName(const std::string& _rDeviceName)
|
||||||
|
|
|
@ -40,14 +40,7 @@ CWII_IPC_HLE_Device_di::CWII_IPC_HLE_Device_di(u32 _DeviceID, const std::string&
|
||||||
, m_pFileSystem(NULL)
|
, m_pFileSystem(NULL)
|
||||||
, m_ErrorStatus(0)
|
, m_ErrorStatus(0)
|
||||||
, m_CoverStatus(DI_COVER_REG_NO_DISC)
|
, m_CoverStatus(DI_COVER_REG_NO_DISC)
|
||||||
{
|
{}
|
||||||
if (VolumeHandler::IsValid())
|
|
||||||
{
|
|
||||||
m_pFileSystem = DiscIO::CreateFileSystem(VolumeHandler::GetVolume());
|
|
||||||
m_CoverStatus |= DI_COVER_REG_INITIALIZED;
|
|
||||||
m_CoverStatus &= ~DI_COVER_REG_NO_DISC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_di::~CWII_IPC_HLE_Device_di()
|
CWII_IPC_HLE_Device_di::~CWII_IPC_HLE_Device_di()
|
||||||
{
|
{
|
||||||
|
@ -60,6 +53,12 @@ CWII_IPC_HLE_Device_di::~CWII_IPC_HLE_Device_di()
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_di::Open(u32 _CommandAddress, u32 _Mode)
|
bool CWII_IPC_HLE_Device_di::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
{
|
{
|
||||||
|
if (VolumeHandler::IsValid())
|
||||||
|
{
|
||||||
|
m_pFileSystem = DiscIO::CreateFileSystem(VolumeHandler::GetVolume());
|
||||||
|
m_CoverStatus |= DI_COVER_REG_INITIALIZED;
|
||||||
|
m_CoverStatus &= ~DI_COVER_REG_NO_DISC;
|
||||||
|
}
|
||||||
Memory::Write_U32(GetDeviceID(), _CommandAddress + 4);
|
Memory::Write_U32(GetDeviceID(), _CommandAddress + 4);
|
||||||
m_Active = true;
|
m_Active = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -60,8 +60,8 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string&
|
||||||
, m_pContentLoader(NULL)
|
, m_pContentLoader(NULL)
|
||||||
, m_TitleID(-1)
|
, m_TitleID(-1)
|
||||||
, AccessIdentID(0x6000000)
|
, AccessIdentID(0x6000000)
|
||||||
{
|
, m_ContentFile()
|
||||||
}
|
{}
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_es::~CWII_IPC_HLE_Device_es()
|
CWII_IPC_HLE_Device_es::~CWII_IPC_HLE_Device_es()
|
||||||
{
|
{
|
||||||
|
@ -69,9 +69,14 @@ CWII_IPC_HLE_Device_es::~CWII_IPC_HLE_Device_es()
|
||||||
m_NANDContent.clear();
|
m_NANDContent.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWII_IPC_HLE_Device_es::Load(const std::string& _rDefaultContentFile)
|
void CWII_IPC_HLE_Device_es::LoadWAD(const std::string& _rContentFile)
|
||||||
{
|
{
|
||||||
m_pContentLoader = &DiscIO::CNANDContentManager::Access().GetNANDLoader(_rDefaultContentFile);
|
m_ContentFile = _rContentFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
|
{
|
||||||
|
m_pContentLoader = &DiscIO::CNANDContentManager::Access().GetNANDLoader(m_ContentFile);
|
||||||
|
|
||||||
// check for cd ...
|
// check for cd ...
|
||||||
if (m_pContentLoader->IsValid())
|
if (m_pContentLoader->IsValid())
|
||||||
|
@ -102,10 +107,7 @@ void CWII_IPC_HLE_Device_es::Load(const std::string& _rDefaultContentFile)
|
||||||
//FindValidTitleIDs();
|
//FindValidTitleIDs();
|
||||||
|
|
||||||
INFO_LOG(WII_IPC_ES, "Set default title to %08x/%08x", (u32)(m_TitleID>>32), (u32)m_TitleID);
|
INFO_LOG(WII_IPC_ES, "Set default title to %08x/%08x", (u32)(m_TitleID>>32), (u32)m_TitleID);
|
||||||
}
|
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
|
|
||||||
{
|
|
||||||
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
||||||
m_Active = true;
|
m_Active = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
|
|
||||||
virtual ~CWII_IPC_HLE_Device_es();
|
virtual ~CWII_IPC_HLE_Device_es();
|
||||||
|
|
||||||
void Load(const std::string& _rDefaultContentFile);
|
void LoadWAD(const std::string& _rContentFile);
|
||||||
|
|
||||||
virtual bool Open(u32 _CommandAddress, u32 _Mode);
|
virtual bool Open(u32 _CommandAddress, u32 _Mode);
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ private:
|
||||||
std::vector<u64> m_TitleIDs;
|
std::vector<u64> m_TitleIDs;
|
||||||
u64 m_TitleID;
|
u64 m_TitleID;
|
||||||
u32 AccessIdentID;
|
u32 AccessIdentID;
|
||||||
|
std::string m_ContentFile;
|
||||||
|
|
||||||
u64 GetCurrentTitleID() const;
|
u64 GetCurrentTitleID() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue