diff --git a/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp b/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp index 0b5dc3114a..98e8fcba5b 100644 --- a/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp +++ b/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp @@ -37,14 +37,16 @@ IPCCommandResult USB_HIDv5::IOCtl(const IOCtlRequest& request) case USB::IOCTL_USBV5_SHUTDOWN: return Shutdown(request); case USB::IOCTL_USBV5_GETDEVPARAMS: - return HandleDeviceIOCtl(request, [&](auto& device) { return GetDeviceInfo(device, request); }); + return HandleDeviceIOCtl(request, + [&](USBV5Device& device) { return GetDeviceInfo(device, request); }); case USB::IOCTL_USBV5_ATTACHFINISH: return GetDefaultReply(IPC_SUCCESS); case USB::IOCTL_USBV5_SUSPEND_RESUME: - return HandleDeviceIOCtl(request, [&](auto& device) { return SuspendResume(device, request); }); + return HandleDeviceIOCtl(request, + [&](USBV5Device& device) { return SuspendResume(device, request); }); case USB::IOCTL_USBV5_CANCELENDPOINT: return HandleDeviceIOCtl(request, - [&](auto& device) { return CancelEndpoint(device, request); }); + [&](USBV5Device& device) { return CancelEndpoint(device, request); }); default: request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR); return GetDefaultReply(IPC_SUCCESS); @@ -151,10 +153,11 @@ IPCCommandResult USB_HIDv5::GetDeviceInfo(USBV5Device& device, const IOCtlReques Memory::CopyToEmu(request.buffer_out + 56, &config_descriptor, sizeof(config_descriptor)); std::vector interfaces = host_device->GetInterfaces(0); - auto it = std::find_if(interfaces.begin(), interfaces.end(), [&](const auto& interface) { - return interface.bInterfaceNumber == device.interface_number && - interface.bAlternateSetting == alt_setting; - }); + auto it = std::find_if(interfaces.begin(), interfaces.end(), + [&](const USB::InterfaceDescriptor& interface) { + return interface.bInterfaceNumber == device.interface_number && + interface.bAlternateSetting == alt_setting; + }); if (it == interfaces.end()) return GetDefaultReply(IPC_EINVAL); it->Swap(); diff --git a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp b/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp index 93fad5d0c1..8e71f5b6d9 100644 --- a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp +++ b/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp @@ -45,17 +45,19 @@ IPCCommandResult USB_VEN::IOCtl(const IOCtlRequest& request) case USB::IOCTL_USBV5_SHUTDOWN: return Shutdown(request); case USB::IOCTL_USBV5_GETDEVPARAMS: - return HandleDeviceIOCtl(request, [&](auto& device) { return GetDeviceInfo(device, request); }); + return HandleDeviceIOCtl(request, + [&](USBV5Device& device) { return GetDeviceInfo(device, request); }); case USB::IOCTL_USBV5_ATTACHFINISH: return GetDefaultReply(IPC_SUCCESS); case USB::IOCTL_USBV5_SETALTERNATE: - return HandleDeviceIOCtl(request, - [&](auto& device) { return SetAlternateSetting(device, request); }); + return HandleDeviceIOCtl( + request, [&](USBV5Device& device) { return SetAlternateSetting(device, request); }); case USB::IOCTL_USBV5_SUSPEND_RESUME: - return HandleDeviceIOCtl(request, [&](auto& device) { return SuspendResume(device, request); }); + return HandleDeviceIOCtl(request, + [&](USBV5Device& device) { return SuspendResume(device, request); }); case USB::IOCTL_USBV5_CANCELENDPOINT: return HandleDeviceIOCtl(request, - [&](auto& device) { return CancelEndpoint(device, request); }); + [&](USBV5Device& device) { return CancelEndpoint(device, request); }); default: request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR); return GetDefaultReply(IPC_SUCCESS); @@ -141,10 +143,11 @@ IPCCommandResult USB_VEN::GetDeviceInfo(USBV5Device& device, const IOCtlRequest& Memory::CopyToEmu(request.buffer_out + 40, &config_descriptor, sizeof(config_descriptor)); std::vector interfaces = host_device->GetInterfaces(0); - auto it = std::find_if(interfaces.begin(), interfaces.end(), [&](const auto& interface) { - return interface.bInterfaceNumber == device.interface_number && - interface.bAlternateSetting == alt_setting; - }); + auto it = std::find_if(interfaces.begin(), interfaces.end(), + [&](const USB::InterfaceDescriptor& interface) { + return interface.bInterfaceNumber == device.interface_number && + interface.bAlternateSetting == alt_setting; + }); if (it == interfaces.end()) return GetDefaultReply(IPC_EINVAL); it->Swap();