fix(input): keep camera inversion out of stick rest detection #2286
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2286
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/stick-rest-inversion"
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?
Summary
Changing camera X/Y inversion can make the camera spin again after the held-stick protection blocked a phantom axis. The setting flips the sign used to recognize a physical crossing, permanently admitting the unchanged held input; reversing the setting then reverses the spin instead of stopping it.
Fixes #2273 by keeping rest detection independent of configurable output inversion.
Technical changes
Validation
Tested
8f572915on main49f75dc8:pad_sdl.ctranslation unit also compiles on both, using runtime model headers generated solely from tracked recompiler source, without game instructions.jqsupplied for the release-script checks.windows.hfor the compute-guard fixture, and the recorder destructor negative control. One new source check passes; no new failures.These are authored device samples and real compiled host code. A physical controller and game runtime have not been tested; no gameplay or performance result is claimed. Hosted exact-head checks are pending.
Claimed before implementation in dev-work and on the issue. Severity S2; reach1.0 is an upper bound, since the affected SDL/phantom-device subset is unknown; confidence1.0 refers to the authored source regression.
Looks good. The fix is small and right: the rest detector now always sees the stick in one fixed orientation (right X as 0, right Y as 1), and camera inversion is applied to the admitted output afterwards. That is the same output as before for every admitted input (the old
inv_y ? 0 : 1and the new-von top of the fixed flip cancel exactly), and it stops the setting from flipping the sign the rest/crossing check sees. Neutral and worn-stick crossing recovery are untouched.CI: the source regressions, Windows builder and Vulkan jobs pass. The AppImage job timed out at 1h, which is unrelated to a 6-line change in
pad_sdl.c.Overlap: #1600 (stick direction outside the dead zone) edits the same block in
pads_polland dropsstick_value, so whichever lands second needs a rebase. They don't disagree, though: #1600 also does the inversion after filtering (if (inv_x) v[2] = -v[2]), just with the Y flip folded in differently, and it would need to keep this PR's placement after the rest gating. #1945 (camera speed) doesn't touchpad_sdl.c, so no conflict.Nit: a physical controller has not been tried (the PR says so), so a quick in-game check of a toggle with a real pad would be nice, but not blocking.
github-sync referenced this pull request2026-11-12 06:22:54 +00:00