Skip to content

improve support for gamepads - #7655

Merged
notimaginative merged 2 commits into
scp-fs2open:masterfrom
notimaginative:gamepad_support
Aug 4, 2026
Merged

improve support for gamepads#7655
notimaginative merged 2 commits into
scp-fs2open:masterfrom
notimaginative:gamepad_support

Conversation

@notimaginative

@notimaginative notimaginative commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Make use of the SDL gamepad API to improve support for gamepads. Also adds support for rumble and triggers as buttons.

NOTE: This is a semi-breaking change as control bindings for gamepads can change compared to older builds.

@notimaginative notimaginative added enhancement A new feature or upgrade of an existing feature to add additional functionality. controls A feature or issue related to input devices or actions controlled/triggered by them Lab A feature or bug related to the F3 lab labels Jul 25, 2026
@notimaginative
notimaginative force-pushed the gamepad_support branch 8 times, most recently from a3b2099 to 651314e Compare July 31, 2026 02:07
Use the SDL gamepad API to add full gamepad support. Adds rumble for supported
gamepads and changes the FF in-game options to take immediate effect instead
of requiring a restart.

Additionally this makes changes to allow gamepad triggers to be used as both
an axis and a button. This support is specific to gamepads since we can
explicitly identify the trigger with the API and act on it accordingly. FSO
control config doesn't currently support such an action directly however so
we have to hack it in just a bit. Due to this the control binding will show
the trigger axis name bound to a button control only while a gamepad is
connected, otherwise it shows a button name associated with the trigger.
@notimaginative

Copy link
Copy Markdown
Contributor Author

The gamepad navigation support has become it's own beast and will be split off into it's own PR. What remains is the basic gamepad support which has already been in testing with all of the SDL3 test builds for the past 10-11 months.

@notimaginative
notimaginative marked this pull request as ready for review August 3, 2026 15:42
@notimaginative
notimaginative requested a review from z64555 as a code owner August 3, 2026 15:42
@notimaginative notimaginative removed the Lab A feature or bug related to the F3 lab label Aug 3, 2026
Comment thread code/io/joy-sdl.cpp
Comment thread code/io/joy-sdl.cpp
@wookieejedi

wookieejedi commented Aug 3, 2026

Copy link
Copy Markdown
Member

Given the testing has been going well it overall looks good, but had two questions/comments, thanks!

@wookieejedi wookieejedi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks!

@notimaginative

Copy link
Copy Markdown
Contributor Author

I'll wait 12 hours or so to merge in case those in different timezones or sleep schedules might want to comment as well.

@notimaginative
notimaginative merged commit 6d3c287 into scp-fs2open:master Aug 4, 2026
18 checks passed
@notimaginative
notimaginative deleted the gamepad_support branch August 4, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls A feature or issue related to input devices or actions controlled/triggered by them enhancement A new feature or upgrade of an existing feature to add additional functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants