Skip to content

Fix PAD stick range#74

Merged
Antidote merged 2 commits into
encounter:mainfrom
Irastris:ira/pad-fix
Mar 31, 2026
Merged

Fix PAD stick range#74
Antidote merged 2 commits into
encounter:mainfrom
Irastris:ira/pad-fix

Conversation

@Irastris

Copy link
Copy Markdown
Contributor

In the port project which shall not be named, sticks would act like they were fully tilted long before the stick was actually physically at full tilt. I was able to reproduce this behavior on Xbox Series X, Xbox One, and DualSense controllers.

Scaling the range after the deadzone math brings Aurora inline with Dolphin Emulator's behavior, in so far as I can perceive visually anyways.

Probably shouldn't be merged until more ports (I.E. Metaforce) and more controllers are tested to ensure this doesn't cause regressions.

Comment thread lib/dolphin/pad/pad.cpp Outdated
@Antidote

Copy link
Copy Markdown
Collaborator

This looks correct, and should account for the transients I was worried about, I'll test metaforce with this sometime today or tomorrow for regressions.

@Irastris

Copy link
Copy Markdown
Contributor Author

According to a user of a GameCube controller with a Mayflash adapter, this also improved stick handling for them as well

@Antidote

Copy link
Copy Markdown
Collaborator

According to a user of a GameCube controller with a Mayflash adapter, this also improved stick handling for them as well

If that's the case, then checking metaforce would be a bit redundant. I'm fine with merging this as-is.

@Irastris

Copy link
Copy Markdown
Contributor Author

Before it is, I just did some testing and this breaks sticks completely when combined with @caseif axis remapping PR. Will try to figure out why soon.

@Antidote

Copy link
Copy Markdown
Collaborator

Oh, yeah better get that figured out, it's probably an issue with ranges, iirc SDL uses a signed 16bit value for sticks, GC doesn't so the ranges must be scaled

@Irastris

Copy link
Copy Markdown
Contributor Author

Axis remapping PR is bugged in general I think, following up with a comment on it shortly

@caseif

caseif commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

I just tested this on top of the latest version of #73 and it seems to work well now - I think the issue was just the overflow rather than any actual incompatibility with this PR.

@Irastris

Copy link
Copy Markdown
Contributor Author

I can also confirm that the latest changes to caseif's PR fixed input for my modern controllers, and is compatible with my PR

@Antidote
Antidote merged commit decc4e4 into encounter:main Mar 31, 2026
@Irastris
Irastris deleted the ira/pad-fix branch April 1, 2026 03:30
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.

4 participants