Repository navigation
Test held-key order through guest GameInput readings - #2
Open
MichaelSmithAI wants to merge 4 commits into
Open
MichaelSmithAI wants to merge 4 commits into
MichaelSmithAI wants to merge 4 commits into
Conversation
…documented Microsoft's GameInput documentation for IGameInputReading::GetKeyState states: "New keys are added at the end of the array, and when a key is released, everything shifts down to fill in the gap." Previously, host::Host::keys rebuilt the held-key list on every poll in ascending virtual-key order, so holding Z and then pressing A reported [A, Z] instead of [Z, A]. Remember the previous poll's held virtual keys on host::Host and order each poll's result with a pure press_order helper that keeps still-held keys in their prior order and appends newly pressed keys at the end. Co-Authored-By: Gemini 4 Neon <noreply@google.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…documented Microsoft's GameInput documentation for IGameInputReading::GetKeyState states: "New keys are added at the end of the array, and when a key is released, everything shifts down to fill in the gap." Previously, host::Host::keys rebuilt the held-key list on every poll in ascending virtual-key order, so holding Z and then pressing A reported [A, Z] instead of [Z, A]. Remember the previous poll's held virtual keys on host::Host and order each poll's result with a pure press_order helper that keeps still-held keys in their prior order and appends newly pressed keys at the end. Co-Authored-By: Gemini 4 Neon <noreply@google.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BastienRodz
force-pushed
the
hle/held-keys-in-press-order
branch
from
November 25, 2026 00:27
4ce99c1 to
d8f9221
Compare
Author
|
I compared the failed Windows job on In the PR run, both Clippy steps passed, as did the retained-key regression and all 145 HLE library tests. The PR diff is confined to GameInput. |
BastienRodz
force-pushed
the
hle/held-keys-in-press-order
branch
2 times, most recently
from
November 25, 2026 01:14
bf0f22a to
cd16903
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a Windows regression to the held-key ordering fix in Marvisak#874. It supplies successive keyboard states at the host query boundary, polls GameInput, then reads the retained snapshots through GetKeyState. The test checks press order, release and repress, and a caller buffer that holds only two keys.
On Win64 under Wine the same test failed on ffe310e with [A, Z] after Z then A were observed on separate polls. All nine GameInput tests passed with this fixture on 4ce99c1. The fixture measures changes between polls. Physical keyboard and title behavior were outside the test.