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

Open
youroot-code wants to merge 1 commit from upstream-pr/23 into main
youroot-code commented 2026-11-24 20:15:44 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by youroot-code on 2026-11-24T20:15:44Z.


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\ (\

<!-- greyfinch-sync:fxceless/victory-fork:issue:6590554912 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/23). Originally posted by [youroot-code](https://github.com/youroot-code) on 2026-11-24T20:15:44Z. --- ### 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\ (\
akimfomin commented 2026-11-24 21:30:39 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by akimfomin on 2026-11-24T20:34:13Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7143747600 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/23#issuecomment-7143747600). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-24T20:34:13Z. --- 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.
adriaespii commented 2026-11-24 21:30:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by adriaespii on 2026-11-24T21:04:12Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7144434058 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/23#issuecomment-7144434058). Originally posted by [adriaespii](https://github.com/adriaespii) on 2026-11-24T21:04:12Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/23:upstream-pr/23'
git switch 'upstream-pr/23'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/23'
git switch 'upstream-pr/23'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/23'
git switch 'upstream-pr/23'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/23'
git switch 'main'
git merge --squash 'upstream-pr/23'
git switch 'main'
git merge --ff-only 'upstream-pr/23'
git switch 'main'
git merge 'upstream-pr/23'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
fxceless/victory-fork!23
No description provided.