Ryzee119 / tusb_xinput

TinyUSB xinput host driver I am using in some of my projects
MIT License
36 stars 8 forks source link

added 360w guide button to mapping #12

Closed DinsFire64 closed 2 months ago

DinsFire64 commented 2 months ago

Minor oversight on the 360 wireless mapping was the lack of the guide button being brought forward to the user.

As an aside I notice you check the connect/disconnect packet for the status of the device, but you only call tuh_xinput_report_received_cb when there is new_pad_data. That leaves the caller oblivious to know when a pad has been disconnected.

Should we be calling tuh_xinput_report_received_cb on a disconnect and expect it to check connected to preform operations when the pad was disconnected/reconnected?

Or how else can we let the host code know that a 360 wireless gamepad has been disconnected?

Ryzee119 commented 2 months ago

Thanks. The disconnect event might just be a bug. I'll have a look unless you want to take a shot