On Fri Apr 4 21:07:44 2025 +0000, Paul Gofman wrote:
> Yes, it seems to be using it (while that worked for me without
> CM_Get_Parent at least with some controllers).
> CM_Get_Parent() per se is easy to implement, but to make any sense of it
> the first thing is that the actual HID drivers (or ntoskrnl rather,
> maybe) should be setting DEVPKEY_Device_Parent property. But also before
> that, as I understand, currently Wine HID stack ends in xinput or SDL
> backends and not in USD or Bluetooth Wine driver, that is probably the
> major thing here. I think the linked hidapi library code only hits
> CM_Get_Parent() in hid_internal_detect_bus_type() and failure there
> results in HID_API_BUS_UNKNOWN, which doesn't fail the whole thing but
> misses some properties.
Maybe in theory those backends may expose device properties to partially mimic USB or BTH devices and make this library fully happy, but I am not sure, didn't really look into that part.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7727#note_100024
On Fri Apr 4 20:22:39 2025 +0000, Ivo Ivanov wrote:
> They probably use "hidapi" to communicate with hid devices:
> https://github.com/libusb/hidapi/blob/8c9cbf6c020974d23e4690497778f3df173d1…
> The Simucube Tuner app, which is used to control Simucube 2 FFB wheel
> bases, is also affected by this. Seems the usblib devs have switched
> from setupapi to cfgmgr32 in the recent years, and now this is starting
> to appear in games/apps. Looks like only CM_Get_Parent remains to be implemented.
> BTW, Steam shows a similar usage pattern of these apis in the logs, so
> it probably uses hidapi as well.
Yes, it seems to be using it (while that worked for me without CM_Get_Parent at least with some controllers).
CM_Get_Parent() per se is easy to implement, but to make any sense of it the first thing is that the actual HID drivers (or ntoskrnl rather, maybe) should be setting DEVPKEY_Device_Parent property. But also before that, as I understand, currently Wine HID stack ends in xinput or SDL backends and not in USD or Bluetooth Wine driver, that is probably the major thing here. I think the linked hidapi library code only hits CM_Get_Parent() in hid_internal_detect_bus_type() and failure there results in HID_API_BUS_UNKNOWN, which doesn't fail the whole thing but misses some properties.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7727#note_100023
On Fri Apr 4 20:22:39 2025 +0000, Paul Gofman wrote:
> Fixes MySims Kingdom not working with controllers.
> WRT the last patch, we don't set any properties for devicee interfaces
> currently. I could not find device id in the properties subkeys for
> device interfaces on Windows (as well as any properties, actually,
> across a few interfaces I checked). So I guess even we will be adding
> properties for device interfaces device instance id will be treated as a
> special case anyway. DEVPKEY_Device_InstanceId is the only property
> which this specific game queries with
> CM_Get_Device_Interface_PropertyW(), so I don't have a real world
> example of any other been used.
They probably use "hidapi" to communicate with hid devices:
https://github.com/libusb/hidapi/blob/8c9cbf6c020974d23e4690497778f3df173d1…
The Simucube Tuner app, which is used to control Simucube 2 FFB wheel bases, is also affected by this. Seems the usblib devs have switched from setupapi to cfgmgr32 in the recent years, and now this is starting to appear in games/apps. Looks like only CM_Get_Parent remains to be implemented.
BTW, Steam shows a similar usage pattern of these apis in the logs, so it probably uses hidapi as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7727#note_100022