Wii IPC HLE: Fix IPC missing reply fail

This commit is contained in:
Hector Martin 2016-12-01 06:35:12 +09:00
parent 2b906e3fc4
commit 288e75f672
2 changed files with 11 additions and 1 deletions

View File

@ -533,6 +533,11 @@ void ExecuteCommand(u32 address)
{ {
result = device->IOCtl(address); result = device->IOCtl(address);
} }
else
{
Memory::Write_U32(FS_EINVAL, address + 4);
result = IWII_IPC_HLE_Device::GetDefaultReply();
}
break; break;
} }
case IPC_CMD_IOCTLV: case IPC_CMD_IOCTLV:
@ -541,6 +546,11 @@ void ExecuteCommand(u32 address)
{ {
result = device->IOCtlV(address); result = device->IOCtlV(address);
} }
else
{
Memory::Write_U32(FS_EINVAL, address + 4);
result = IWII_IPC_HLE_Device::GetDefaultReply();
}
break; break;
} }
default: default:

View File

@ -50,7 +50,7 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_ven::IOCtlV(u32 command_address)
IPCCommandResult CWII_IPC_HLE_Device_usb_ven::IOCtl(u32 command_address) IPCCommandResult CWII_IPC_HLE_Device_usb_ven::IOCtl(u32 command_address)
{ {
IPCCommandResult reply = GetNoReply(); IPCCommandResult reply = GetDefaultReply();
u32 command = Memory::Read_U32(command_address + 0x0c); u32 command = Memory::Read_U32(command_address + 0x0c);
u32 buffer_in = Memory::Read_U32(command_address + 0x10); u32 buffer_in = Memory::Read_U32(command_address + 0x10);
u32 buffer_in_size = Memory::Read_U32(command_address + 0x14); u32 buffer_in_size = Memory::Read_U32(command_address + 0x14);