On Tue Mar 19 15:42:29 2024 +0000, Rémi Bernon wrote:
The issue is that we want to avoid creating duplicate devices, and when both an hidraw and non-hidraw devices are accessible for the same hardware device, we want to discard the hidraw device instead if it's not preferred. I've created https://gitlab.winehq.org/wine/wine/-/merge_requests/5352 instead, which passes the device HID usages information to the main loop, and prefer hidraw for anything that is not a game controller. And for hidraw devices, on Linux, we have to request the device report descriptor to get that information, and it can only be parsed on the PE side.
Ok, I see, avoiding duplicates makes sense.
What I did not understand is why parsing must be on the PE side and we couldn't just call ``` winebus_call(device_remove, ¶ms);` ``` when hidraw device is not preferred and rely on the device subsystem hierarchy?
And the fact that I did not understand does surprise me at all, this is the first time I'm poking Wine. But I am asking this genuinely to educate my self about Wine's internals.
Anyways, I tested your branch and it seems to work and fix [the bug](https://bugs.winehq.org/show_bug.cgi?id=56450). I'll close this MR.