Input: taps between two of the title's pad readings are lost at low frame rates (input latch, stick dead zone) #429
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-27T17:56:45Z.
What is wrong
The title takes a pad's current reading once a frame (
IGameInput::GetCurrentReading). At world frame rates here (about 0.5 fps on an M5 Pro, per the README's table), a press and release that fall between two of its readings are in our reading history but in no reading the title sees. Tapped actions (sprint, jump) do nothing; held prompts work. The same was seen and fixed on the Wine/D3DMetal route at 2 to 4 fps (halfwave50/VIctory-macOS-halfwave5052e0325).A related, smaller one: host stick values are raw. A stick at rest reads a few per cent off centre, and every wobble of it is a new reading.
Plan
Port halfwave50's two switches (GPL-3.0, credited), both off by default:
VICTORY_INPUT_LATCH=1: a button change the title has not seen yet waits for its next reading (up last time and down at any time since shows down; down last time and let go since shows up; pressed again too: down in the reading after). Triggers show their peak since the last reading, sticks their latest value. Readings within 15 ms agree; with no reading for 2 s the latch lets go.VICTORY_STICK_DEADZONE=<share>: a round dead zone per stick, the rest of the travel spread over 0 to 1.Hooks: the latch in
State::pollfor host pads and the keyboard's stand-in pad, hand-outs incurrent_readingandtemporal_reading; the dead zone inHub::pollbefore scripted keys are merged. Their Wine-onlyVICTORY_INPUT_REFOCUSis not needed here:window.rsreleases keys when the window loses key status.Tests: halfwave50's unit tests for the latch and dead zone, plus an end-to-end test through
GetCurrentReadingwith the fake host (a tap between two readings is seen once; a held button in every reading). No game run yet.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-27T17:57:07Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T17:57:17Z.
Claimed by @marcus-4. Open a draft pull request with
Refs #429in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-28T08:19:19Z.
/release
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-28T08:25:50Z.
/release
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T08:25:59Z.
Released. This issue is free to claim.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T11:07:16Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T11:07:28Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #429in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:37:21Z.
/release - done: PR #598 adds
VICTORY_INPUT_LATCHandVICTORY_STICK_DEADZONE, both off by default and documented. Carried in my fork'smain(69146296), gate green.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:43:14Z.
/release - done: PR #598 adds
VICTORY_INPUT_LATCHandVICTORY_STICK_DEADZONE, both off by default and documented. Carried in my fork'smain(69146296), gate green.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:43:25Z.
Released. This issue is free to claim.