Skip to content

fix: set joypad input events to -1 (All Devices) so remapped buttons work on any controller. #78

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ciph3rzer0
Copy link

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant