HLE: write a neutral GameInput state for non-gamepad readings #369

Open
github-bot wants to merge 1 commit from github-bot/gh-369 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 00:00 UTC · original
avt0m4t48:fix/gameinput-neutral-non-gamepad → main · +16 −8 · 1 files · 1 commits · open

GameInput specifies that a reading of the wrong kind returns false and writes the default at-rest gamepad state. Victory returned false with the caller's previous state still in the output. Write a neutral state for a keyboard reading so a reused buffer cannot retain old button, trigger, or stick values. Microsoft API contract

The existing keyboard/stand-in test now passes the same state buffer to both reading kinds through their interface vtables. It failed on main and passed with the fix. All five fake-source module tests passed in the Linux harness. A separate vtable probe filled and then cleared all seven fields. The Windows MSVC HLE and GPU test targets type-checked with warnings denied. Native Windows execution and game behavior were outside these checks.

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 00:00 UTC · [original](https://github.com/fxceless/victory-fork/pull/369) `avt0m4t48:fix/gameinput-neutral-non-gamepad` → `main` · +16 −8 · 1 files · 1 commits · open GameInput specifies that a reading of the wrong kind returns `false` and writes the default at-rest gamepad state. Victory returned `false` with the caller's previous state still in the output. Write a neutral state for a keyboard reading so a reused buffer cannot retain old button, trigger, or stick values. [Microsoft API contract](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate?view=gdk-2604#remarks) The existing keyboard/stand-in test now passes the same state buffer to both reading kinds through their interface vtables. It failed on main and passed with the fix. All five fake-source module tests passed in the Linux harness. A separate vtable probe filled and then cleared all seven fields. The Windows MSVC HLE and GPU test targets type-checked with warnings denied. Native Windows execution and game behavior were outside these checks. AI-assisted using Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:41:50 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 14:43 UTC · original

All six GameInput module tests passed on native Windows at 8982484. The keyboard and stand-in pad test reuses the same gamepad output buffer through both vtables and verifies that the keyboard reading returns false with a neutral output. These tests use a fake input source and do not require a physical controller.

Exact-head Windows run

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/369#issuecomment-7165712006) All six GameInput module tests passed on native Windows at `8982484`. The keyboard and stand-in pad test reuses the same gamepad output buffer through both vtables and verifies that the keyboard reading returns false with a neutral output. These tests use a fake input source and do not require a physical controller. [Exact-head Windows run](https://github.com/avt0m4t48/victory-fork/actions/runs/45636256267) AI-assisted using Codex.
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/369/head:github-bot/gh-369'
git switch 'github-bot/gh-369'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'main'
git merge --squash 'github-bot/gh-369'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'main'
git merge 'github-bot/gh-369'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.