[PR #1078] Add SDL_Joystick support #307

Closed
opened 2026-01-29 19:07:19 +00:00 by claunia · 0 comments
Owner

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.

**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.
claunia added the pull-request label 2026-01-29 19:07:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#307