hle/gameinput: increase reading history from 32 to 256 for low-FPS frames #23

Open
github-bot wants to merge 1 commit from github-bot/gh-23 into main AGit
Owner

@⁠youroot-code on GitHub · 2026-11-24 20:15 UTC · original
youroot-code:fix/gameinput-history → main · +1 −1 · 1 files · 1 commits · open

What

Increases \HISTORY\ in \crates/victory-hle/src/modules/gameinput.rs\ from \32\ to \256.

Why

\gameinput\ polls every 8 ms (\POLL = 8 ms). With \HISTORY = 32, the ring buffer only holds ~256 ms of input transitions. When GTA VI runs at 1–3 fps (330–950 ms per frame), the buffer overflows within a single frame and \GetNextReading\ / \GetPreviousReading\ return \REFERENCE_TOO_OLD\ (\

**@⁠youroot-code** on GitHub · 2026-11-24 20:15 UTC · [original](https://github.com/fxceless/victory-fork/pull/23) `youroot-code:fix/gameinput-history` → `main` · +1 −1 · 1 files · 1 commits · open ### What Increases \HISTORY\ in \crates/victory-hle/src/modules/gameinput.rs\ from \32\ to \256\. ### Why \gameinput\ polls every 8 ms (\POLL = 8 ms\). With \HISTORY = 32\, the ring buffer only holds ~256 ms of input transitions. When GTA VI runs at 1–3 fps (330–950 ms per frame), the buffer overflows within a single frame and \GetNextReading\ / \GetPreviousReading\ return \REFERENCE_TOO_OLD\ (\
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:34:47 +00:00
Author
Owner

@⁠akimfomin on GitHub · 2026-11-24 20:34 UTC · original

I independently checked the GameInput history behavior on Windows build 28000.3501 with Rust 1.100.0. A standalone harness compiled the complete gameinput.rs from 04512df4 and its parent 578d459c. The parent module's bytes also match 16849898 on main. It held the first reading from one fake controller and exercised the original update and reading methods at synthetic 8 ms intervals.

  • Base kept the first reading through 31 later changes. The 32nd returned REFERENCE_TOO_OLD in both directions.
  • With the PR, the first reading was still available after 32 and through 255 later changes. The 256th returned REFERENCE_TOO_OLD in both directions.
  • Both preserved previous/next ordering and kept a single record during 16 identical updates. Three runs per version agreed.

This covers the history behavior with fake input in a standalone harness. If it would help review, I can share the fixture or adapt it to the existing fake-host tests. A separate controller result can also be requested through PortBridge Test Lab. PortBridge surfaced this PR for independent synthetic validation. AI-assisted with OpenAI Codex.

**@⁠akimfomin** on GitHub · 2026-11-24 20:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/23#issuecomment-7143747600) I independently checked the GameInput history behavior on Windows build `28000.3501` with Rust `1.100.0`. A standalone harness compiled the complete `gameinput.rs` from `04512df4` and its parent `578d459c`. The parent module's bytes also match `16849898` on main. It held the first reading from one fake controller and exercised the original update and reading methods at synthetic 8 ms intervals. - Base kept the first reading through 31 later changes. The 32nd returned `REFERENCE_TOO_OLD` in both directions. - With the PR, the first reading was still available after 32 and through 255 later changes. The 256th returned `REFERENCE_TOO_OLD` in both directions. - Both preserved previous/next ordering and kept a single record during 16 identical updates. Three runs per version agreed. This covers the history behavior with fake input in a standalone harness. If it would help review, I can share the fixture or adapt it to the existing fake-host tests. A separate controller result can also be requested through [PortBridge Test Lab](https://akimfomin.github.io/PortBridge/#/lab). [PortBridge](https://github.com/akimfomin/PortBridge) surfaced this PR for independent synthetic validation. AI-assisted with OpenAI Codex.
Author
Owner

@⁠adriaespii on GitHub · 2026-11-24 21:04 UTC · original

Independent test run on commit 04512df (AMD RDNA4):

  • Hardware: AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo test --workspace: 469 passed, 0 failed, 7 ignored (victory-hle: 95 passed, 0 failed)
  • cargo clippy --workspace --all-targets -- -D warnings: fails on older victory-shader lints because this branch is based before 6a2d9f9 (rebasing onto current main should clear it)
  • Not tested: live game run with gamepad input (no game files on this machine)

AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.

**@⁠adriaespii** on GitHub · 2026-11-24 21:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/23#issuecomment-7144434058) Independent test run on commit `04512df` (AMD RDNA4): - **Hardware:** AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (`x86_64-pc-windows-msvc`) - `cargo test --workspace`: 469 passed, 0 failed, 7 ignored (`victory-hle`: 95 passed, 0 failed) - `cargo clippy --workspace --all-targets -- -D warnings`: fails on older `victory-shader` lints because this branch is based before `6a2d9f9` (rebasing onto current `main` should clear it) - **Not tested:** live game run with gamepad input (no game files on this machine) *AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.*
This pull request can be merged automatically.
This branch is out-of-date with the base branch
The changes on this branch are already on the target branch. This will be an empty commit.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/23/head:github-bot/gh-23'
git switch 'github-bot/gh-23'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'main'
git merge --squash 'github-bot/gh-23'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'main'
git merge 'github-bot/gh-23'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.