godot_input_helper
godot_input_helper copied to clipboard
fix: set joypad input events to -1 (All Devices) so remapped buttons work on any controller.
This may be a very specific issue to my setup. My mouse always takes up device 0 (despite sending no joypad events), so joypad deserialization wasn't working for me. When the mappings where recreated, the device id defaulted to 0.
Connected input devices:
Joypad 0: Swiftpoint Z (GUID: 030000004e2100000500000000000000)
Joypad 1: 8BitDo Receiver (GUID: __XINPUT_DEVICE__)
Joypad 2: MAGIC-NS Lite (GUID: __XINPUT_DEVICE__)
Additionally my testing revealed that setting binds on one controller would be specific to that controller. Maybe that's intended, but setting the device_id to -1 (All devices) so that any new controller is connected is still usable would seem expected. Other solutions I can imagine seem needlessly complicated or unintuitive.
I initially serialized the device ID but obviously the device IDs change and the controller will no longer work if that happens.