GameInput: merge overlapping holds from VICTORY_KEYS #2497
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2499"
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?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T14:52:16Z.
VICTORY_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.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T14:57:56Z.
Review: APPROVED
Verified against
origin/main(940d32f):VICTORY_KEYSinto connected host pads is clean and well-tested.cargo test -p victory-hle gameinput: 9/9 passed (includingscripted_keys_merge_into_connected_host_pad).cargo clippy -p victory-hle --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
v18446744073709551615folder makes an update lose the save in release builds (follow-up to #1729) #2495Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:55:14Z.
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
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:10:18Z.
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