feat: Adds the 8BitDo layout to for proper GamePad support.
PR Details
Currently 8BitDo controllers dont have a registered layout so they will not work as GamePads. This adds the vendor Id and layout so that it will work outside of an XInput context.
Related Issue
No related issues, I found this by trying to use SDL on linux and the GamePad always being null.
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [ ] My change requires a change to the documentation.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [x] I have built and run the editor to try this change out.
Do you have a link to the vendor specs? If so can it be added as comment?
We might need to do fixes in the future so it's good to have a reference.
Unfortunately not a full spec sheet I only have the vendor Id and product Id from the mapping on my machine \\?\hid#vid_2dc8&pid_310a ... and using Device Hunt and there is the USB spec sheet for general USB debugging https://www.usb.org/sites/default/files/hut1_4.pdf
Although its important to note that this mapping is probably only useful for the SDL context since the mappings are coming from the JoyStick controller mappings so maybe I should check that this is also coming from the SDL input source?
Moving this to draft, let us know when you're done working on this one :)
Makes sense, I think I may replace this with a more generic solution because of the "only useful for the SDL context since the mappings are coming from the JoyStick controller mappings" issue.
I did start using the HIDDevice lib from DevDecoder so that the controllers would work consistently between different windowing backends.
https://github.com/Doprez/Doprez.Stride.MoreInput/blob/main/src/GameControllerHIDDevice.cs