Repository navigation
Insert menu: Stick dead zone (Default 24%, 5%–30%), one cut for SDL and XInput pads (#752) - #932
Closed
amaralthalesalves wants to merge 1 commit into
Closed
amaralthalesalves wants to merge 1 commit into
amaralthalesalves wants to merge 1 commit into
Conversation
Both pad paths cut each axis at XInput's 7849 (~24%). They now cut through one function, nn_hid.c's hos_stick_axis, at the row's threshold: Default (7849, the same output as before for every input), 5%, 10%, 15%, 20%, 30%. Per axis, as before; no anti-deadzone scaling. tests/test_stick_dead_zone.py checks all 65536 inputs on both paths, each threshold, and the ini parsing and labels.
Contributor
Author
|
Closing for now: this is a feature request rather than a bug fix, and I'd rather leave feature decisions to the maintainers. The branch stays up if anyone wants to pick it up. |
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.
Both pad paths cut each stick axis at XInput's 7849 (about 24%):
pad_sdl.c'sstick_valueandnn_hid.c's XInputpads_read. They now go through one function,hos_stick_axis(v, zone)innn_hid.c, with the threshold chosen by a new Insert menu row on the Controls tab:stick_dead_zoneinhookshot_options.iniby the same row-name mechanism as the other options, and clamped to 0..5.vk_replay.cpp'st.option). Like the other controls rows, it doesn't move the quality preset to Custom.options_versionisn't bumped: an ini without the key reads as 0, which is today's behaviour.Tests:
tests/test_stick_dead_zone.py, registered inrun_all.pywith gcc/g++.hos_stick_axisandstick_valuewithgcc -Wall -Werrorand checks them against copies of the old XInput and SDL code for all 65536 inputs at Default, plus each threshold's edges in both directions and out-of-range zones.Row,tx_stick_dead_zone,ini_keyandmenu_init's parse line: it checks clamping (3, 9, -4,x, a misspelled key) and the labels.The related input, rumble, text-speed and mouse tests pass.
nn_hid.candpad_sdl.cpassgcc -fsyntax-only -Wall, andvk_menu.cppandvk_replay.cpppassg++ -fsyntax-only.Not verified: I have no game or GPU here, so I haven't seen the row drawn on screen or played with the lower settings.