mirror of
https://github.com/cathery/sys-con.git
synced 2024-12-24 15:13:45 +00:00
Minor changes
This commit is contained in:
parent
7356a742c9
commit
3ff573456f
@ -44,6 +44,12 @@ Result Dualshock3Controller::OpenInterfaces()
|
||||
if (R_FAILED(rc))
|
||||
return rc;
|
||||
|
||||
if (interface->GetDescriptor()->bInterfaceClass != 3)
|
||||
continue;
|
||||
|
||||
if (interface->GetDescriptor()->bInterfaceProtocol != 0)
|
||||
continue;
|
||||
|
||||
if (interface->GetDescriptor()->bNumEndpoints < 2)
|
||||
continue;
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
class SwitchUSBInterface : public IUSBInterface
|
||||
{
|
||||
private:
|
||||
UsbHsClientIfSession m_session{};
|
||||
UsbHsInterface m_interface{};
|
||||
UsbHsClientIfSession m_session;
|
||||
UsbHsInterface m_interface;
|
||||
|
||||
std::array<std::unique_ptr<IUSBEndpoint>, 15> m_inEndpoints;
|
||||
std::array<std::unique_ptr<IUSBEndpoint>, 15> m_outEndpoints;
|
||||
|
@ -18,7 +18,7 @@ Result SwitchUSBInterface::Open()
|
||||
UsbHsClientIfSession temp;
|
||||
Result rc = usbHsAcquireUsbIf(&temp, &m_interface);
|
||||
if (R_FAILED(rc))
|
||||
return 11037;
|
||||
return rc;
|
||||
|
||||
m_session = temp;
|
||||
|
||||
|
@ -253,7 +253,7 @@ Result mainLoop()
|
||||
else
|
||||
{
|
||||
|
||||
UsbHsInterface interfaces[8];
|
||||
UsbHsInterface interfaces[16];
|
||||
s32 total_entries;
|
||||
|
||||
if (R_SUCCEEDED(QueryInterfaces(interfaces, sizeof(interfaces), &total_entries, USB_CLASS_VENDOR_SPEC, 93, 1)))
|
||||
@ -293,7 +293,7 @@ Result mainLoop()
|
||||
if (R_SUCCEEDED(rc))
|
||||
{
|
||||
WriteToLog("Dualshock 3 event went off");
|
||||
UsbHsInterface interfaces[4];
|
||||
UsbHsInterface interfaces[8];
|
||||
s32 total_entries;
|
||||
|
||||
if (R_SUCCEEDED(QueryInterfaces(interfaces, sizeof(interfaces), &total_entries, USB_CLASS_HID, 0, 0)))
|
||||
@ -306,7 +306,7 @@ Result mainLoop()
|
||||
if (R_SUCCEEDED(rc))
|
||||
{
|
||||
WriteToLog("Dualshock 4 event went off");
|
||||
UsbHsInterface interfaces[4];
|
||||
UsbHsInterface interfaces[8];
|
||||
s32 total_entries;
|
||||
|
||||
if (R_SUCCEEDED(QueryInterfaces(interfaces, sizeof(interfaces), &total_entries, USB_CLASS_HID, 0, 0)))
|
||||
|
Loading…
Reference in New Issue
Block a user