Skip to content

Stick dead zone: an Insert menu row (stick_dead_zone), issue 752 - #1298

Merged
hckrman101 merged 3 commits into
NotRexed:mainfrom
bronze-ff:feat/stick-dead-zone
Nov 9, 2026
Merged

hckrman101 merged 3 commits into
NotRexed:mainfrom
bronze-ff:feat/stick-dead-zone

Conversation

@bronze-ff

@bronze-ff bronze-ff commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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's stick_value and nn_hid.c's XInput pads_read. Both now go through one function, hos_stick_axis(v, zone) in nn_hid.c. A new Stick dead zone row on the Controls tab picks the threshold: Default (24%), 5%, 10%, 15%, 20% or 30%.

  • At Default the output is the same as before for every input on both paths. An ini without the key reads as 0, which is today's behaviour.
  • The cut stays per axis, and only the threshold changes. The game's own dead zone still applies after it.
  • The row is saved as stick_dead_zone by its name. It is preset_exempt, like the other controls rows.

Changes from #932, needed for current main

Validation

On CachyOS (GCC 16, Clang 23, RTX 5060, Hyprland/Wayland), at main 7dbdcdc:

  • tests/test_stick_dead_zone.py fails 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.py reports 168 passed and 1 failed. The failure is nx2/test_nup_read_name.py, which needs zstandard, missing here.
  • In the game, a virtual USB Xbox Series controller opened the menu and went to Controls, where Stick dead zone shows < Default (24%) >. Right set it to 5% and saved stick_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.

bronze-ff and others added 3 commits November 9, 2026 18:10
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>
@hckrman101
hckrman101 merged commit 475ce7e into NotRexed:main Nov 9, 2026
10 checks passed
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
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.

Controller dead zone adjuster

1 participant