mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #1078] Add SDL_Joystick support #307
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/stenzek/duckstation/pull/1078
State: closed
Merged: Yes
This PR needs testing with libretro and NeGcon controllers! The range of I/II buttons has been modified so I can't guarantee there are no regressions.
This PR refactors and extends the SDL controller interface to not only support GameController peripherals, but also Joystick ones. This allows users to use various peripherals which don't fit the standardized game controller interface.
This PR was only tested with a steering wheel, but in theory it should make it possible to use e.g. flight sticks or other devices matching the official ones for PS1.
It's possible that the new extended mapping heuristics don't cover all possible cases, but I have verified that mapping works as expected e.g. with both separate pedal axes as well as combined axes. Inverted axes are also now supported.