fix: set joypad input events to -1 (All Devices) so remapped buttons work on any controller. #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.