modified to compile for me
Fork of USBHostXpad by
Revision 9:2b1ba1e2eb70, committed 2017-04-03
- Comitter:
- Ownasaurus
- Date:
- Mon Apr 03 00:51:40 2017 +0000
- Parent:
- 8:f5f3dd9b97b6
- Commit message:
- Fixed support for Microsoft brand wired X360 controllers, which was not working (even though offbrands were)
Changed in this revision
USBHostXpad.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f5f3dd9b97b6 -r 2b1ba1e2eb70 USBHostXpad.cpp --- a/USBHostXpad.cpp Fri Feb 24 02:45:08 2017 +0000 +++ b/USBHostXpad.cpp Mon Apr 03 00:51:40 2017 +0000 @@ -405,8 +405,17 @@ return false; } if (dev) { - if (host->interruptWrite(dev, int_out, odata, 12) != USB_TYPE_OK) { - return false; + if(dev_type == TYPE_XBOX360) + { + if (host->interruptWrite(dev, int_out, odata, 3) != USB_TYPE_OK) { + return false; + } + } + else if(dev_type == TYPE_XBOX360W) + { + if (host->interruptWrite(dev, int_out, odata, 4) != USB_TYPE_OK) { + return false; + } } } return true;