Skip to content

Deal with sensors on ps4/5 guitars#15143

Merged
slouken merged 5 commits into
libsdl-org:mainfrom
sanjay900:wii-ps3-instruments
Mar 8, 2026
Merged

Deal with sensors on ps4/5 guitars#15143
slouken merged 5 commits into
libsdl-org:mainfrom
sanjay900:wii-ps3-instruments

Conversation

@sanjay900

@sanjay900 sanjay900 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Description

Add support for whammy and tilt on PS4/5 guitars
PS4/5 controllers put device specific data into a specific region in the report, so we have to extract it sperately.
No known guitars use the right stick on the guitar, so to keep things working similarly to PS3, i have opted to map whammy and tilt the same way as the PS3 rb guitars.

Also noted there was an off by one with tilt on PS3 guitars while testing this, and it turns out in some scenarios that actually matters

Existing Issue(s)

@sanjay900 sanjay900 changed the title deal with sensors on ps4/5 guitars Deal with sensors on ps4/5 guitars Mar 2, 2026
@sanjay900
sanjay900 marked this pull request as draft March 2, 2026 04:09
@sanjay900
sanjay900 force-pushed the wii-ps3-instruments branch from fcf1bce to cd8f10f Compare March 2, 2026 06:28
@sanjay900
sanjay900 marked this pull request as ready for review March 7, 2026 21:45
@sanjay900
sanjay900 marked this pull request as draft March 8, 2026 00:32
@sanjay900
sanjay900 marked this pull request as ready for review March 8, 2026 00:38
SDL_PrivateJoystickAddSensor(ctx->joystick, SDL_SENSOR_ACCEL, (float)(1000 / ctx->report_interval));
}

if (ctx->guitar_tilt_supported) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm still not comfortable with these coming through as sensor data, but I'll accept this for now.

@slouken
slouken merged commit 94f17d6 into libsdl-org:main Mar 8, 2026
44 of 45 checks passed
@slouken slouken added this to the 3.4.4 milestone Mar 8, 2026
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.

2 participants