Repository navigation
Stick dead zone: an Insert menu row (stick_dead_zone), issue 752 - #1298
Merged
Merged
Conversation
Picks up NotRexed#932 by amaralthalesalves, which its author closed to leave the feature to the maintainers. Ported onto current main: - Both pad paths, SDL (pad_sdl.c) and XInput (nn_hid.c), now cut each stick axis through nn_hid.c's hos_stick_axis, with the threshold from a Controls row: Default (XInput's 7849, ~24%, the same output as before for every input), 5%, 10%, 15%, 20%, 30%. - Option id 10: NotRexed#932's 18 is HOS_OPT_GYRO since the motion rows came in. - The row is preset_exempt, like the other controls rows; saved as stick_dead_zone by its name. - tests/test_stick_dead_zone.py is NotRexed#932's test, adapted to the row format and to option 10. Co-authored-by: Thales Amaral <amaralthalesalves@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the Stick dead zone and Audio output labels after their adjacent edits.
Leave option 10 free for the Frame rate row in NotRexed#1330. Assisted-by: OpenAI Codex Co-authored-by: Codex <codex@openai.com>
wyatt-poole
added a commit
to wyatt-poole/Hookshot
that referenced
this pull request
Nov 10, 2026
Conflicts with NotRexed#1298 (stick dead zone row) and the wider Motion sensitivity X (10% to 600%) on main: tx_deadzone and tx_stick_dead_zone both kept; the motion rows stay on the Motion page with X's new 600% top; the readme's Motion row lists X's range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsKC8mjbyEUFAv6uy3SQiW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #752.
This picks up #932 by @amaralthalesalves. Its author closed it to leave the feature to the maintainers, and the branch was left up for anyone to continue. The commit credits them as co-author.
What it does
Both pad paths cut each stick axis at XInput's 7849 (about 24%):
pad_sdl.c'sstick_valueandnn_hid.c's XInputpads_read. Both now go through one function,hos_stick_axis(v, zone)innn_hid.c. A new Stick dead zone row on the Controls tab picks the threshold: Default (24%), 5%, 10%, 15%, 20% or 30%.stick_dead_zoneby its name. It ispreset_exempt, like the other controls rows.Changes from #932, needed for current main
HOS_OPT_GYRO. After review, this PR moved from 10 to 11 because vk: descriptor slotgen and sampler cache #1330 uses 10 for Frame rate. The two options use separate entries in the renderer's table.Rowlayout (hint,restart,preset_exempt).tests/test_stick_dead_zone.pyis Insert menu: Stick dead zone (Default 24%, 5%–30%), one cut for SDL and XInput pads (#752) #932's test, adapted to the row layout and to option 11. It also checks that the row ispreset_exemptand that noHOS_OPT_enum takes 11.Validation
On CachyOS (GCC 16, Clang 23, RTX 5060, Hyprland/Wayland), at main 7dbdcdc:
tests/test_stick_dead_zone.pyfails on main without this change and passes with it, with gcc/g++ and with clang/clang++. It covers all 65,536 inputs on both paths: Default is the old cut, the five other thresholds are exact, and the ini parsing and labels are right.tests/run_all.pyreports 168 passed and 1 failed. The failure isnx2/test_nup_read_name.py, which needszstandard, missing here.< Default (24%) >. Right set it to 5% and savedstick_dead_zone=1, and Left brought it back to Default. The other controls rows in the ini were unchanged.Not tested: the XInput path on Windows, a physical controller, and how the game feels with each threshold.
🤖 Generated with Claude Code
Review follow-up
On Windows with LLVM-MinGW Clang 23.1.5, the stick dead-zone test passed for all 65,536 inputs in both paths with option 11, and the rumble option test passed. After the merge from
main, the audio output and widescreen checks also passed. The controller validation above describes the original implementation and used a virtual pad on CachyOS.