Skip to content

Conversation

@AL2009man
Copy link
Contributor

@AL2009man AL2009man commented Mar 19, 2025

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 of SDL_HINT_JOYSTICK_RAWINPUT (alongside SDL_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.

This swaps XInput hint infavor of RawInput (alongside Correlate XInput) to improve controller compatibility across Xbox gamepads, while allowing more advanced feature sets.
@AL2009man AL2009man changed the title Swaps XInput hint with RawInput joystick driver Swaps XInput joystick driver hint with RawInput Mar 20, 2025
@AL2009man
Copy link
Contributor Author

Due to a Windows Update regression (libsdl-org/SDL#13047 (comment)), this PR will be temporarily closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant