Rémi Bernon (@rbernon) commented about dlls/dinput/joystick_hid.c:
case (DWORD_PTR)DIPROP_JOYSTICKID: { DIPROPDWORD *value = (DIPROPDWORD *)header;
value->dwData = impl->base.instance.guidInstance.Data3;
value->dwData = get_joystick_index( impl->device_path );
It is unappealing to have an ever-growing buffer and critical section only to support joystick indexes, which IIUC are simply unreliable on Windows. We already support opening joystick by indexes, although these indexes will on hotplug, it seems more interesting to use these instead.