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:
skidau 2010-08-25 01:45:23 +00:00
parent 153b019fcd
commit 0f56f5076c
1 changed files with 9 additions and 17 deletions

View File

@ -289,14 +289,7 @@ 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
{
// create new file handle
u32 CurrentDeviceID = g_LastDeviceID; u32 CurrentDeviceID = g_LastDeviceID;
pDevice = CreateFileIO(CurrentDeviceID, DeviceName); pDevice = CreateFileIO(CurrentDeviceID, DeviceName);
g_DeviceMap[CurrentDeviceID] = pDevice; g_DeviceMap[CurrentDeviceID] = pDevice;
@ -308,7 +301,6 @@ void ExecuteCommand(u32 _Address)
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
{ {
CmdSuccess = true; CmdSuccess = true;