IOS/VEN: Read cancel endpoint correctly

Fixes an embarrassing bug that made the implementation utterly useless.

This fixes Your Shape hanging on shutdown. The game was waiting for an
interrupt transfer to be cancelled, and Dolphin wasn't cancelling
transfers on the correct endpoint.
This commit is contained in:
Léo Lam 2019-05-02 18:31:32 +02:00
parent d7e23d71f8
commit b274a054a9
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ s32 USB_VEN::SubmitTransfer(USB::Device& device, const IOCtlVRequest& ioctlv)
IPCCommandResult USB_VEN::CancelEndpoint(USBV5Device& device, const IOCtlRequest& request)
{
const u8 endpoint = static_cast<u8>(Memory::Read_U32(request.buffer_in + 8));
const u8 endpoint = Memory::Read_U8(request.buffer_in + 8);
// IPC_EINVAL (-4) is returned when no transfer was cancelled.
if (GetDeviceById(device.host_id)->CancelTransfer(endpoint) < 0)
return GetDefaultReply(IPC_EINVAL);