fix: Gamepad not detected due to window handler definition error
PR Details
When connecting a Logitech RumblePad II gamepad, SharpDX.DirectInput returns an error related to an invalid window identifier.
Related Issue
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] 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.
@dotnet-policy-service agree
Converting this to draft while the contributor gets back to us
Sorry for the long delay. I can't get back now gamepads from true gamers. I hope to return to this PR in 2-3 months
I tested connection/disconnection a game controller in a foreground/background game window, and also running two games that support game controllers. The game controller works in both simultaneously. There were no crashes when the game window lost focus. In any case, this is a temporary solution that allows game controllers to work out of the box. Silk.Net.Input Silk.Net.Input looks more promising. This script is for testing. Any comments are welcome.