Input: taps between two of the title's pad readings are lost at low frame rates (input latch, stick dead zone) #429

Open
opened 2026-11-27 17:56:45 +00:00 by marcus-4 · 10 comments
marcus-4 commented 2026-11-27 17:56:45 +00:00 (Migrated from github.com)
Contributor

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-halfwave50 52e0325).

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::poll for host pads and the keyboard's stand-in pad, hand-outs in current_reading and temporal_reading; the dead zone in Hub::poll before scripted keys are merged. Their Wine-only VICTORY_INPUT_REFOCUS is not needed here: window.rs releases 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 GetCurrentReading with the fake host (a tap between two readings is seen once; a held button in every reading). No game run yet.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6651956432 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429). Originally posted by [marcus-4](https://github.com/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-halfwave50 `52e0325`). 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::poll` for host pads and the keyboard's stand-in pad, hand-outs in `current_reading` and `temporal_reading`; the dead zone in `Hub::poll` before scripted keys are merged. Their Wine-only `VICTORY_INPUT_REFOCUS` is not needed here: `window.rs` releases 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 `GetCurrentReading` with the fake host (a tap between two readings is seen once; a held button in every reading). No game run yet.
marcus-4 commented 2026-11-27 17:57:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-27T17:57:07Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7224959956 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7224959956). Originally posted by [marcus-4](https://github.com/marcus-4) on 2026-11-27T17:57:07Z. --- /claim
github-actions[bot] commented 2026-11-27 17:57:17 +00:00 (Migrated from github.com)
Author
Contributor

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 #429 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7224962879 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7224962879). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T17:57:17Z. --- Claimed by @marcus-4. Open a draft pull request with `Refs #429` in its description within 24 hours, or the claim expires.
marcus-4 commented 2026-11-28 08:19:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-28T08:19:19Z.


/release

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7236506999 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7236506999). Originally posted by [marcus-4](https://github.com/marcus-4) on 2026-11-28T08:19:19Z. --- /release
marcus-4 commented 2026-11-28 08:25:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by marcus-4 on 2026-11-28T08:25:50Z.


/release

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7236577612 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7236577612). Originally posted by [marcus-4](https://github.com/marcus-4) on 2026-11-28T08:25:50Z. --- /release
github-actions[bot] commented 2026-11-28 08:25:59 +00:00 (Migrated from github.com)
Author
Contributor

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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7236579334 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7236579334). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:25:59Z. --- Released. This issue is free to claim.
AnastasisKon commented 2026-11-28 11:07:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T11:07:16Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7238340437 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7238340437). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T11:07:16Z. --- /claim
github-actions[bot] commented 2026-11-28 11:07:28 +00:00 (Migrated from github.com)
Author
Contributor

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 #429 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7238342605 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7238342605). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T11:07:28Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #429` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-28 12:37:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:37:21Z.


/release - done: PR #598 adds VICTORY_INPUT_LATCH and VICTORY_STICK_DEADZONE, both off by default and documented. Carried in my fork's main (69146296), gate green.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239353934 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7239353934). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T12:37:21Z. --- /release - done: PR #598 adds `VICTORY_INPUT_LATCH` and `VICTORY_STICK_DEADZONE`, both off by default and documented. Carried in my fork's `main` (69146296), gate green.
AnastasisKon commented 2026-11-28 12:43:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:43:14Z.


/release - done: PR #598 adds VICTORY_INPUT_LATCH and VICTORY_STICK_DEADZONE, both off by default and documented. Carried in my fork's main (69146296), gate green.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239420545 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7239420545). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T12:43:14Z. --- /release - done: PR #598 adds `VICTORY_INPUT_LATCH` and `VICTORY_STICK_DEADZONE`, both off by default and documented. Carried in my fork's `main` (69146296), gate green.
github-actions[bot] commented 2026-11-28 12:43:25 +00:00 (Migrated from github.com)
Author
Contributor

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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239422532 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/429#issuecomment-7239422532). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T12:43:25Z. --- Released. This issue is free to claim.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#429
No description provided.