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

Dmitry Torokhov
2026-04-04T06:39:55Z

On April 3, 2026 11:35:35 PM PDT, Sanjay Govind <sanjay.govind9@gmail.com> wrote:
>> 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.

That sounds sensible.

>
>> 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.

No, this is fine too.

>
>> 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.

OK, then let's keep it as switch.

Thanks.

--
Dmitry