Repository navigation
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.
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, so Insert menu: Stick dead zone (Default 24%, 5%–30%), one cut for SDL and XInput pads (#752) #932's id would have read the gyro switch. 10 sits beside the other controls' ids (4 to 9). It is a plain number like those, sotest_rumble_menu's duplicate-id check still parses it. No open PR uses 10: feat: Audio tab in the Insert menu with Volume and Mute in background #1270 takes 27 and 28.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 10. It also checks that the row ispreset_exemptand that noHOS_OPT_enum takes 10.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