When attaching an Xbox 360 gamepad a computer, the LED on the gamepad
blinks by default. When the operating system (read: normally an Xbox 360) initializes the gamepad, the LED stops blinking. Change our uhid code to do the same. PR: 97169 Submitted by: Ed Schouten <ed@fxq.nl>
This commit is contained in:
parent
4d3976cebb
commit
e932b6c236
@ -280,6 +280,12 @@ USB_ATTACH(uhid)
|
||||
} else if (id->bInterfaceClass == UICLASS_VENDOR &&
|
||||
id->bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER &&
|
||||
id->bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD) {
|
||||
static uByte reportbuf[] = {1, 3, 0};
|
||||
|
||||
/* The LEDs on the gamepad are blinking by default, turn off. */
|
||||
usbd_set_report(uaa->iface, UHID_OUTPUT_REPORT, 0,
|
||||
&reportbuf, sizeof reportbuf);
|
||||
|
||||
/* The Xbox 360 gamepad has no report descriptor. */
|
||||
size = sizeof uhid_xb360gp_report_descr;
|
||||
descptr = uhid_xb360gp_report_descr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user