Re: [PATCH] xpad: Overhaul device data for wireless devices

Sanjay Govind
2026-04-04T06:35:49Z

> However you should not change product and version once input device is
> registered. So you should delay not until after link packet is received,
> but until after the capabilities packet.
Yeah i wanted to do that originally, but the main issue with that is
some gamepads don't actually send the capabilities data at all. An
Easy solution I could think of is to just start a timer and continue
the init if it expires and we haven't gotten the capabilities data.

> Another option is to use version field...
Yeah that is reasonable, I had just gone with putting it in the
product id like that as it made things easier for SDL, and microsoft
had done that for the wheel subtype already, so some apps already have
the 0x02a2 pid.
Happy to change that though if you'd prefer i use the version field.

> Maybe have an array of
>
> [type] = "Name"
>
> instead of this switch?
The main problem is there's a lot of gaps in the list of subtypes, and
this also isn't an exhaustive list, there are a few other subtypes out
there that were used for some bespoke controllers, and so using switch
at least means they can keep a generic name if they are used.