GameInput: merge overlapping holds from VICTORY_KEYS #2499
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!2499
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2499/head"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 14:52 UTC · original
andrewpozdnakov7-jpg:codex2/scripted-key-overlap→main· +53 −8 · 1 files · 1 commits · closed without mergingVICTORY_KEYSholds each scheduled key for 200 ms. When two events for the same key overlap, the keyboard reading currently contains two copies of that key. The end of the earlier event can also change the ordering of still-held keys.Build continuous hold intervals once at startup. Overlapping and touching intervals for the same key share one hold, in scheduled press order. A real gap still allows the key to be released and pressed again.
The same synthetic schedule returns
A, B, Ahalfway through the overlap on940d32fandA, Bwith this change. It also checks thatA, Bstays in order past the earlier event's end, that the keys are released at the end of their holds, and that a laterAbecomes a separate press. The 10 GameInput tests, strict HLE Clippy with diagnostics, and staged asset policy passed on Windows.Coordination claim
Please retain the Git author when cherry-picking or rebasing. If you fold the change into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with Codex.
github-bot referenced this pull request2026-11-26 05:12:42 +00:00
@Marvisak on GitHub · 2026-11-25 15:55 UTC · original
Automated triage for the maintainers. Recommended for a look (not an approval).
In
crates/victory-hle/src/modules/gameinput.rs(diagnostics-onlyVICTORY_KEYSpath),scripted()returned one entry per overlapping event, soHost::keys()could report the same key twice in one keyboard reading. The PR builds merged hold intervals once (scheduled_key_holds) and reads them withscripted_at; I checked the merge logic and the test's expected timings (overlap merged, end exclusive, a later press after a gap is separate). Small and contained to the diagnostics feature; CI (check) is passing.Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:10 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because the duplicates it merges change nothing: they arise only when a script schedules the same key twice within 0.2 s, and the title ORs key states into its table. It rewrites the same
scripted()as #2205 (per-entry hold lengths) and would have to be redone on top of that.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed