Report overlapping VICTORY_KEYS holds as one active key #2718
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!2718
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2718"
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?
@VlREX on GitHub · 2026-11-25 18:46 UTC · original
VlREX:fix/duplicate-scripted-keys→main· +69 −6 · 1 files · 2 commits · openWith VICTORY_KEYS=0:W,0.05:A,0.1:W the diagnostics keyboard reported W, A, W at 100 ms. Report each active virtual key once, releasing it only after its last hold expires. A deterministic regression test exercises overlapping intervals, another simultaneously held key, and the release boundary. It failed before the fix and passed afterward, alongside seven existing fake-host input tests in an isolated Windows GNU run. No game assets or physical keyboard required.
@DrDarkDK on GitHub · 2026-11-25 18:50 UTC · original
The
.len()check at 249 ms misses an order change in this fixture.active_scripted_keysreturnsWAat 199 ms andAWat 200 ms. The first W interval expires, but the second still holds W, so neither key was released or pressed at that boundary.Could the test assert
WAat 249 ms? The earlier #2499 covers the same overlap and preserves the order by merging holds before polling.AI-assisted with Codex.
@kotekompotek on GitHub · 2026-11-25 18:51 UTC · original
Correct - dedupe keeps first-occurrence order and a key survives until its last overlapping hold expires; checked_sub also avoids the subtraction-underflow the old window check would hit before t=0. Boundary tests at exactly 200/250ms pin the half-open interval.
@Marvisak on GitHub · 2026-11-25 23:18 UTC · original
Automated triage for the maintainers.
This PR merges overlapping holds of the same key in the diagnostics-only
VICTORY_KEYSpath (scripted()incrates/victory-hle/src/modules/gameinput.rs, viascheduled_key_holds/active_scripted_keys). The merge logic reads correctly. However, #2499 made the same change and was closed on review today. Duplicates only appear when a script schedules the same key twice within 0.2 s, and the title ORs key states into its table, so a repeated key changes nothing it sees. This PR also rewrites the samescripted()as the open #2205 (per-entry hold lengths) and would need to be redone on top of it. To change this, show a case where the duplicate or the order change alters what the title does.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
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.