Changed WII IPC HLE to continue execution after the game attempts to open unknown devices.
The allows Prince of Persia: The Forgotten Sands to be played. Fixes issue 2684 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6123 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
153b019fcd
commit
0f56f5076c
|
@ -289,25 +289,17 @@ void ExecuteCommand(u32 _Address)
|
||||||
if (DeviceName.find("/dev/") != std::string::npos)
|
if (DeviceName.find("/dev/") != std::string::npos)
|
||||||
{
|
{
|
||||||
ERROR_LOG(WII_IPC_FILEIO, "Unknown device: %s", DeviceName.c_str());
|
ERROR_LOG(WII_IPC_FILEIO, "Unknown device: %s", DeviceName.c_str());
|
||||||
PanicAlert("Unknown device: %s\n\nMaybe you can continue to play or maybe the game will freeze.", DeviceName.c_str());
|
|
||||||
|
|
||||||
pDevice = AccessDeviceByID(GetDeviceIDByName(std::string("_Unknown_Device_")));
|
|
||||||
CmdSuccess = pDevice->Open(_Address, Mode);
|
|
||||||
}
|
}
|
||||||
else
|
u32 CurrentDeviceID = g_LastDeviceID;
|
||||||
{
|
pDevice = CreateFileIO(CurrentDeviceID, DeviceName);
|
||||||
// create new file handle
|
g_DeviceMap[CurrentDeviceID] = pDevice;
|
||||||
u32 CurrentDeviceID = g_LastDeviceID;
|
g_FileNameMap[CurrentDeviceID] = DeviceName;
|
||||||
pDevice = CreateFileIO(CurrentDeviceID, DeviceName);
|
g_LastDeviceID++;
|
||||||
g_DeviceMap[CurrentDeviceID] = pDevice;
|
|
||||||
g_FileNameMap[CurrentDeviceID] = DeviceName;
|
|
||||||
g_LastDeviceID++;
|
|
||||||
|
|
||||||
CmdSuccess = pDevice->Open(_Address, Mode);
|
CmdSuccess = pDevice->Open(_Address, Mode);
|
||||||
|
|
||||||
INFO_LOG(WII_IPC_FILEIO, "IOP: Open File (Device=%s, ID=%08x, Mode=%i)",
|
INFO_LOG(WII_IPC_FILEIO, "IOP: Open File (Device=%s, ID=%08x, Mode=%i)",
|
||||||
pDevice->GetDeviceName().c_str(), CurrentDeviceID, Mode);
|
pDevice->GetDeviceName().c_str(), CurrentDeviceID, Mode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue