Skip to content

Test held-key order through guest GameInput readings - #2

Open
MichaelSmithAI wants to merge 4 commits into
BastienRodz:hle/held-keys-in-press-orderfrom
MichaelSmithAI:test/874-key-reading-order
Open

MichaelSmithAI wants to merge 4 commits into
BastienRodz:hle/held-keys-in-press-orderfrom
MichaelSmithAI:test/874-key-reading-order

Conversation

@MichaelSmithAI

Copy link
Copy Markdown

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.

BastienRodz and others added 2 commits November 24, 2026 13:00
…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
BastienRodz force-pushed the hle/held-keys-in-press-order branch from 4ce99c1 to d8f9221 Compare November 25, 2026 00:27
@MichaelSmithAI

Copy link
Copy Markdown
Author

I compared the failed Windows job on 3db0398 with the CI run for the base commit d8f9221. Both hit the same two shader failures: the lane-4 gather returned [66, 67, 35, 34] instead of [65, 66, 34, 33], and neither available device created the wave32 permute pipeline.

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
BastienRodz force-pushed the hle/held-keys-in-press-order branch 2 times, most recently from bf0f22a to cd16903 Compare November 25, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants