allow multiple titles on sysmenu versions > 3.0
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6198 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ecb4d6d2f8
commit
18123251d1
|
@ -319,12 +319,6 @@ void ExecuteCommand(u32 _Address)
|
||||||
// The device is already created
|
// The device is already created
|
||||||
pDevice = AccessDeviceByID(DeviceID);
|
pDevice = AccessDeviceByID(DeviceID);
|
||||||
|
|
||||||
// If we return -6 here after a Open > Failed > CREATE_FILE > ReOpen call
|
|
||||||
// sequence Mario Galaxy and Mario Kart Wii will not start writing to the file,
|
|
||||||
// it will just (seemingly) wait for one or two seconds and then give an error
|
|
||||||
// message. So I'm trying to return the DeviceID instead to make it write to the file.
|
|
||||||
// (Which was most likely the reason it created the file in the first place.)
|
|
||||||
|
|
||||||
// F|RES: prolly the re-open is just a mode change
|
// F|RES: prolly the re-open is just a mode change
|
||||||
|
|
||||||
INFO_LOG(WII_IPC_FILEIO, "IOP: ReOpen (Device=%s, DeviceID=%08x, Mode=%i)",
|
INFO_LOG(WII_IPC_FILEIO, "IOP: ReOpen (Device=%s, DeviceID=%08x, Mode=%i)",
|
||||||
|
@ -332,23 +326,7 @@ void ExecuteCommand(u32 _Address)
|
||||||
|
|
||||||
if (pDevice->IsHardware())
|
if (pDevice->IsHardware())
|
||||||
{
|
{
|
||||||
if (pDevice->IsOpened())
|
pDevice->Open(_Address, Mode);
|
||||||
{
|
|
||||||
if (pDevice->GetDeviceName().find("/dev/net/kd/request") != std::string::npos)
|
|
||||||
// AyuanX: /dev/net/kd/request is more like event which doesn't need close so it can be reopened
|
|
||||||
pDevice->Open(_Address, Mode);
|
|
||||||
else
|
|
||||||
// We have already opened this hardware, return -6
|
|
||||||
|
|
||||||
// AyuanX: TO_BE_VERIFIED
|
|
||||||
// -6 seems to be a bad number as in NET it means "Retry Again"(?)
|
|
||||||
// I guess -4 stands for "Already Opened"(?)
|
|
||||||
Memory::Write_U32(u32(-6), _Address + 4);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pDevice->Open(_Address, Mode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,19 +80,10 @@ bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
if (m_pContentLoader->IsValid())
|
if (m_pContentLoader->IsValid())
|
||||||
{
|
{
|
||||||
m_TitleID = m_pContentLoader->GetTitleID();
|
m_TitleID = m_pContentLoader->GetTitleID();
|
||||||
// System menu versions about 0xE0 will indicate that system files are corrupted if there is more than one title
|
|
||||||
// TODO: fix System menu versions above this and remove this check
|
|
||||||
|
|
||||||
if (m_pContentLoader->GetTitleVersion() <= 0xE0)
|
DiscIO::cUIDsys::AccessInstance().GetTitleIDs(m_TitleIDs);
|
||||||
{
|
// uncomment if ES_GetOwnedTitlesCount / ES_GetOwnedTitles is implemented
|
||||||
DiscIO::cUIDsys::AccessInstance().GetTitleIDs(m_TitleIDs);
|
// DiscIO::cUIDsys::AccessInstance().GetTitleIDs(m_TitleIDsOwned, true);
|
||||||
// uncomment if ES_GetOwnedTitlesCount / ES_GetOwnedTitles is implemented
|
|
||||||
// DiscIO::cUIDsys::AccessInstance().GetTitleIDs(m_TitleIDsOwned, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_TitleIDs.push_back(TITLEID_SYSMENU);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (VolumeHandler::IsValid())
|
else if (VolumeHandler::IsValid())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue