[PATCH 5/8] winebus.sys: Always add a non &MI_XX suffixed hardware id.

Rémi Bernon rbernon at codeweavers.com
Mon Sep 6 13:03:15 CDT 2021


On 9/6/21 7:03 PM, Zebediah Figura wrote:
> On 9/6/21 1:40 AM, Rémi Bernon wrote:
>> Depending on the internal bus, we may find the same kind of device with
>> different input number. For instance SDL bus has no way of figuring an
>> input number, and it will not have any, but UDEV will have one for every
>> device.
>>
>> This will help matching devices with their VID_XXXX&PID_XXXX ids, by
>> matching both the &MI_XX suffixed (if any) and non-suffixed IDs.
> 
> Native doesn't do this for USB devices, which bothers me. Can you give a 
> specific example of where we'd need to do this? Can we just match both 
> variations in the .inf file instead?
> 

The example is with that XBox controller will have a &MI_00 suffix when 
using UDEV bus (with input subsystem), and not when using SDL bus.

I looked closer to the UDEV input number parsing and there doesn't seem 
to be a good way of telling if the device really has multiple interfaces 
or not. Also the xpad linux driver seems to actually have multiple 
interfaces.

We could just make sure to add an input number on every device on the 
SDL bus, or not on the UDEV bus with input subsystem, or duplicate the 
lines in the inf. All solutions seemed equally bad.

I don't think the solution here matters very much either, as it's all 
under the WINEBUS\ namespace, which is separate from USB\ prefix and 
unlikely to match any actual driver. The more general hardware IDs are 
also added last, so they would have a lower ranking in the driver 
matching score.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list