Rémi Bernon (@rbernon) commented about dlls/dinput/joystick_hid.c:
+ * devices are added, and the registry will be updated. + */ + for (tmp = hid_list; *tmp; tmp = tmp + wcslen( tmp ) + 1) + { + WCHAR instance_id[MAX_DEVICE_ID_LEN], product[MAX_PATH], path[MAX_PATH]; + struct joystick_instance *instance = NULL; + BOOL override = FALSE; + DEVPROPTYPE type; + CONFIGRET ret; + WORD vid, pid; + WCHAR *tmp2; + ULONG size; + + wcscpy( path, tmp ); + memset( product, 0, sizeof(product) ); + if (!hid_joystick_validate( path, &vid, &pid, product )) continue; I'm wondering whether we need this here, we could just enumerate every HID device and delegate until the actual calls to EnumDevices / CreateDevice to open and check if they are valid joysticks?
Similar question with the override, I think it is a per application setting, so we might not want to enumerate differently if it is set or not. There's a question to whether we want the same instance guid for both the IG device and the overridden one, possibly not. If yes then we could keep the override check only when the device is opened, fixing up its path there. If no and if we want to handle them as separate but exclusive devices maybe we could enumerate both all HID devices *and* all WINEXINPUT devices every time, then only allow to open one or the other at EnumDevices/CreateDevice time based on the override setting. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10364#note_135651