On Thu Nov 28 17:23:13 2024 +0000, Paul Gofman wrote:
Could you please point me to which opening joystick by index you mean? The only one I can immediately think of is in xinput and there it is based on setupapi device enumeration order and not some intrinsic index.
Ah, if you mean the index passed to hid_joystick_device_open(), I think it is no go. It is based on setupapi current device enumeration and may change during lifetime of an open device, yielding opended _JOYSTICKID of open device changing after something else is plugged or unplugged. Or, if we store that id for joystick on creation, opening the same device once again without replugging it may lead a different index.