Add optional dead zone for gamepad sticks (VICTORY_PAD_DEADZONE) #14

Closed
github-bot wants to merge 1 commit from github-bot/gh-14 into main AGit
Owner

@⁠pmaho on GitHub · 2026-11-28 21:36 UTC · original
pmaho:pad-deadzone-fix → main · +33 −2 · 1 files · 1 commits · closed without merging

What this does

Applies a configurable dead-zone rescale to raw gamepad stick axes so stick rest offset (drift) is silenced while full deflection is still reached at the edge of travel. Default dead zone is 0.10; set the VICTORY_PAD_DEADZONE environment variable to change it.

Changed file

  • crates/victory-hle/src/modules/gameinput.rs (only file touched)

Tests

  • New unit test: pad_deadzone_silences_rest_offset_and_preserves_full_deflection

Windows release build compiles (cargo xwin); unit suite: new test passes; 3 pre-existing wine-timing tests fail on base too (lifecycle x2, xmem x1); native Linux cargo test does not compile on base either. Not yet tested in a long in-game session upstream.

**@⁠pmaho** on GitHub · 2026-11-28 21:36 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/pull/14) `pmaho:pad-deadzone-fix` → `main` · +33 −2 · 1 files · 1 commits · closed without merging ## What this does Applies a configurable dead-zone rescale to raw gamepad stick axes so stick rest offset (drift) is silenced while full deflection is still reached at the edge of travel. Default dead zone is 0.10; set the `VICTORY_PAD_DEADZONE` environment variable to change it. ## Changed file - `crates/victory-hle/src/modules/gameinput.rs` (only file touched) ## Tests - New unit test: `pad_deadzone_silences_rest_offset_and_preserves_full_deflection` Windows release build compiles (cargo xwin); unit suite: new test passes; 3 pre-existing wine-timing tests fail on base too (lifecycle x2, xmem x1); native Linux `cargo test` does not compile on base either. Not yet tested in a long in-game session upstream.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:06:26 +00:00
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-11-29 11:17 UTC · original

Thank you. I took it into my working copy with two changes: off unless VICTORY_PAD_DEADZONE is set, and more tests.

**@⁠Slaktarn700** on GitHub · 2026-11-29 11:17 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/pull/14#issuecomment-7255014131) Thank you. I took it into my working copy with two changes: off unless `VICTORY_PAD_DEADZONE` is set, and more tests.
github-bot closed this pull request 2026-12-01 15:00:50 +00:00
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-12-01 14:56 UTC · original

VICTORY_PAD_DEADZONE is in main already (off unless set).

**@⁠Slaktarn700** on GitHub · 2026-12-01 14:56 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/pull/14#issuecomment-7315075808) `VICTORY_PAD_DEADZONE` is in main already (off unless set).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.