Swaps XInput joystick driver hint with RawInput #1435
Closed
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.
During my practice session: I've been learning how to implement Xbox's Impulse Trigger/Trigger Rumble. it should help me prepare for the eventual Input Action system (as I wanna figure out how to do #1246)
Impulse Triggers seem to be tied towards either Windows.Gaming.Input, GameInput or Steam's Xbox Extended Feature driver (at least according to John SDL himself: Slouken). It took me a while to figure out, but simply enabling RawInput driver hint directly and now Trigger Rumbles works. Ultimately: I opted for RawInput driver instead of WGI.
I thought to myself: "I should add RawInput support on UnleahsedRecomp for futureproofing along the road"
This PR explicitly replaces
SDL_HINT_XINPUT_ENABLED* in favor ofSDL_HINT_JOYSTICK_RAWINPUT(alongsideSDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT) to improve controller compatibility across Xbox gamepads, while allowing more advanced feature sets like Trigger Rumbles and potentially: allowing the same PlayStation Lightbar functionality for Xbox Elite Series 2 controller in the near future (fun fact: the Xbox Guide button is actually RGB LEDs!)*note: even if the XInput-specific hint is gone: it's still enabled by default regardless, at least according to SDL_hints.h? All it really does is forcefully use the RawInput driver.