From 0f56f5076c77f7f5096e23c2f69ce7ada941cdb9 Mon Sep 17 00:00:00 2001 From: skidau Date: Wed, 25 Aug 2010 01:45:23 +0000 Subject: [PATCH] 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 --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 26 +++++++------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 27010a0186..c9d19f71c0 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -289,25 +289,17 @@ void ExecuteCommand(u32 _Address) if (DeviceName.find("/dev/") != std::string::npos) { 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; - pDevice = CreateFileIO(CurrentDeviceID, DeviceName); - g_DeviceMap[CurrentDeviceID] = pDevice; - g_FileNameMap[CurrentDeviceID] = DeviceName; - g_LastDeviceID++; - - CmdSuccess = pDevice->Open(_Address, Mode); + u32 CurrentDeviceID = g_LastDeviceID; + pDevice = CreateFileIO(CurrentDeviceID, DeviceName); + g_DeviceMap[CurrentDeviceID] = pDevice; + g_FileNameMap[CurrentDeviceID] = DeviceName; + g_LastDeviceID++; - INFO_LOG(WII_IPC_FILEIO, "IOP: Open File (Device=%s, ID=%08x, Mode=%i)", - pDevice->GetDeviceName().c_str(), CurrentDeviceID, Mode); - } + CmdSuccess = pDevice->Open(_Address, Mode); + + INFO_LOG(WII_IPC_FILEIO, "IOP: Open File (Device=%s, ID=%08x, Mode=%i)", + pDevice->GetDeviceName().c_str(), CurrentDeviceID, Mode); } else {