GameInput: deliver registered reading callbacks #2557

Open
github-bot wants to merge 2 commits from github-bot/gh-2557 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 15:43 UTC · original
andrewpozdnakov7-jpg:codex2/gameinput-reading-callback → main · +323 −37 · 1 files · 2 commits · open

Problem

RegisterReadingCallback returns S_OK and a token, but changes in host input never reach the registered callback.

Fix

Dispatch new readings through the existing GameInput poll loop with the v0 callback signature. Respect the input-kind and device filters, accumulate stick or trigger movement against the last report for each subscriber, and deliver button changes immediately. Keep the reading alive during the call and use the existing stop/unregister lifecycle.

Verification

  • On da82e44, the synthetic test registers successfully but records zero callbacks after the stick crosses the threshold and a button is pressed.
  • With this change, the same test receives both pad readings. The fixture also checks that registration does not replay the current state, other devices and input kinds are filtered, reconnect delivers the new reading, and stop/unregister prevent future calls. Keyboard delivery uses the same registration entry point.
  • The local HLE library suite with diagnostics and strict HLE Clippy passed.

Microsoft GameInput callback behavior · v0 callback signature history · Coordination claim

If you cherry-pick or rebase this commit, please retain its Git author. If you fold the change into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

AI-assisted. Verification used synthetic host input.

CI follow-up

The GameInput regression passed in the original workflow. The shader harness failed on the same WARP assertion on da82e44 itself. Upstream 67e8ae1 zeroes the test UAVs and passes CI. All 10 GameInput tests and strict HLE Clippy also pass with the same patch on 67e8ae1.

Original main run · Fixed main run · Retested commit

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 15:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/2557) `andrewpozdnakov7-jpg:codex2/gameinput-reading-callback` → `main` · +323 −37 · 1 files · 2 commits · open ## Problem `RegisterReadingCallback` returns `S_OK` and a token, but changes in host input never reach the registered callback. ## Fix Dispatch new readings through the existing GameInput poll loop with the v0 callback signature. Respect the input-kind and device filters, accumulate stick or trigger movement against the last report for each subscriber, and deliver button changes immediately. Keep the reading alive during the call and use the existing stop/unregister lifecycle. ## Verification - On `da82e44`, the synthetic test registers successfully but records zero callbacks after the stick crosses the threshold and a button is pressed. - With this change, the same test receives both pad readings. The fixture also checks that registration does not replay the current state, other devices and input kinds are filtered, reconnect delivers the new reading, and stop/unregister prevent future calls. Keyboard delivery uses the same registration entry point. - The local HLE library suite with diagnostics and strict HLE Clippy passed. [Microsoft GameInput callback behavior](https://learn.microsoft.com/en-us/gaming/gdk/docs/features/common/input/advanced/input-callbacks?view=gdk-2604) · [v0 callback signature history](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/functions/gameinputreadingcallback) · [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) If you cherry-pick or rebase this commit, please retain its Git author. If you fold the change into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted. Verification used synthetic host input. ## CI follow-up The GameInput regression passed in the original workflow. The shader harness failed on the same WARP assertion on `da82e44` itself. Upstream `67e8ae1` zeroes the test UAVs and passes CI. All 10 GameInput tests and strict HLE Clippy also pass with the same patch on `67e8ae1`. [Original main run](https://github.com/Marvisak/VIctory/actions/runs/45646502480/job/139318811414) · [Fixed main run](https://github.com/Marvisak/VIctory/actions/runs/45648653139/job/139326635571) · [Retested commit](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/db3dbb0b9e1a15fd6c01a6ceba03555c2be8528f)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:09:12 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:38 UTC · original · edited 2026-11-26 00:24 UTC

Automated triage for the maintainers.

Needs work (unchanged). The head (a6419be) has not changed since the last review. register_reading in crates/victory-hle/src/modules/gameinput.rs still replaces the documented shortcut on main (the title registers no reading callback; it polls) with about 300 lines of delivery code.

On your reply: thanks for confirming that no title run shows the registration yet, and that the accumulated-delta threshold rule has not been compared with the console runtime. That leaves the same two things that would change the verdict: a title-run log showing the existing input reading callbacks are never called warning, and, if the callback turns out to be needed, a reference for how the threshold is applied. CI: check passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2557#issuecomment-7171191686) · edited 2026-11-26 00:24 UTC <!-- victory-triage v1 head=a6419befe4e56a5adc5c4ae411bfc18f0ff57128 verdict=needs-work at=2026-11-26T00:24:13Z --> Automated triage for the maintainers. **Needs work (unchanged).** The head (`a6419be`) has not changed since the last review. `register_reading` in `crates/victory-hle/src/modules/gameinput.rs` still replaces the documented shortcut on `main` (the title registers no reading callback; it polls) with about 300 lines of delivery code. On your reply: thanks for confirming that no title run shows the registration yet, and that the accumulated-delta threshold rule has not been compared with the console runtime. That leaves the same two things that would change the verdict: a title-run log showing the existing `input reading callbacks are never called` warning, and, if the callback turns out to be needed, a reference for how the threshold is applied. CI: `check` passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 18:41 UTC · original

Re: the triage note. The before/after at a6419be uses a synthetic guest calling the v0 entry point. I found no title-run trace showing registration, so the evidence establishes the API behavior in the fixture only. The existing warning on main would confirm the call if it appears in a title run.

Microsoft documents delivery on subsequent state changes and a minimum movement filter for analog input. The exact accumulated-delta rule in this patch still needs comparison with native v0 behavior. I’ll leave the PR pending the title trace. Registration remarks · Analog filter

AI-assisted.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 18:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/2557#issuecomment-7171268721) Re: [the triage note](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2557). The before/after at `a6419be` uses a synthetic guest calling the v0 entry point. I found no title-run trace showing registration, so the evidence establishes the API behavior in the fixture only. The existing [warning on main](https://github.com/Marvisak/VIctory/blob/13f91caee25f2fdf2c062be5f7a27f058e51cbca/crates/victory-hle/src/modules/gameinput.rs#L774) would confirm the call if it appears in a title run. Microsoft documents delivery on subsequent state changes and a minimum movement filter for analog input. The exact accumulated-delta rule in this patch still needs comparison with native v0 behavior. I’ll leave the PR pending the title trace. [Registration remarks](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback?view=gdk-2604) · [Analog filter](https://learn.microsoft.com/en-us/gaming/gdk/docs/features/common/input/advanced/input-callbacks?view=gdk-2604) AI-assisted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2557/head:github-bot/gh-2557'
git switch 'github-bot/gh-2557'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2557'
git switch 'github-bot/gh-2557'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2557'
git switch 'github-bot/gh-2557'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2557'
git switch 'main'
git merge --squash 'github-bot/gh-2557'
git switch 'main'
git merge --ff-only 'github-bot/gh-2557'
git switch 'main'
git merge 'github-bot/gh-2557'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2557
No description provided.