HLE GameInput: expand per-device reading history to 256 #3105
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3105
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3105"
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?
@fuzeofficlal on GitHub · 2026-11-26 08:12 UTC · original
fuzeofficlal:fix/hle-gameinput-history-depth→main· +68 −2 · 1 files · 1 commits · openSummary
HISTORYincrates/victory-hle/src/modules/gameinput.rsfrom32to256(~2 seconds at the 8 msPOLLinterval) so low-FPS titles (2–5 FPS) do not lose intermediate readings before walking history withGetPreviousReading/GetNextReading.Slot::historyis a heap-allocatedVecDeque<Ref>, avoiding fixed-size stack growth.HISTORY + 10changes (FIFO eviction andGAMEINPUT_E_READING_NOT_FOUNDpast the oldest retained reading).(Motivated by the low-FPS history-depth fix in
fxceless/victory-fork04512df4; orthogonal to #2230.)Verification
cargo test -p victory-hle --locked -- modules::gameinput::: 12 passed, 0 failed.cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings: clean.cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed, 0 failed.@Marvisak on GitHub · 2026-11-26 08:24 UTC · original
Automated triage for the maintainers.
Needs work: evidence for the new depth. Raising
HISTORYfrom 32 to 256 incrates/victory-hle/src/modules/gameinput.rschanges whatGetPreviousReading,GetNextReadingandGetTemporalReadingreturn. A reference older than 32 changes ago now resolves instead of failing withREFERENCE_TOO_OLDor not-found. That is emulation behaviour, and the PR gives no evidence for 256:Readings are only kept when the state changes (
Hub::update). So 32 entries already covers 32 distinct changes between two frames, not 32 polls, and the "2 seconds at 8 ms" sizing in the comment does not hold.The new tests cover the traversal and eviction logic well. If evidence shows the title needs more depth, the same tests can back a value that matches it. One cost to keep in mind:
relativewith no device scans every slot's history under the hub lock, so the depth also costs time per call. CI was still running when this was written.Generated by Claude Code
@oni-swr on GitHub · 2026-11-26 08:28 UTC · original
Independent Windows CPU verification of PR #3105 at
161b283dba(single commit, parent63bcca43c6= main). Claim: #1633 . Windows 11 x64, no GPU, no gamepad,cargo test --locked -j 4 -p victory-hle --lib gameinput, synthetic pad states only.HISTORYset back to 32 fail the 100-change bidirectional walk (previous lookup returns an error); the eviction test is written againstHISTORYso it passes at either size.Not checked: source review, real devices, frame timing, other platforms. Test report only; no source changes and no PR from me.
AI use: Claude Code (Claude Sonnet 5.5) ran the checks, coordinated by Codex (gpt-6.2-sol).
@cloph-dsp on GitHub · 2026-11-26 10:53 UTC · original
Independent local verification of head
161b283on Windows 11, Rust 1.100.0/MSVC:cargo test --locked -p victory-hle --lib modules::gameinput::— 12 passed, 0 failed (including the new history tests).git diff --check origin/main HEAD— clean.Used a worktree-local
CARGO_TARGET_DIRto avoid stale shared-target binaries. Synthetic input only; no game assets, extracted data or DRM material used. AI-assisted (Hy4 flash).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.