HLE/gameinput: a reading-callback registration is refused like the platform #840
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!840
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-840"
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?
@CwWwWwW on GitHub · 2026-11-28 07:34 UTC · original
CwWwWwW:fix/gameinput-reading-callback→main· +43 −4 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCPorted to trustno1-coder/VIctory-NVIDIA from the same change submitted to fxceless/victory-fork as PR #1465 (head
18c04f6765, author CwWwWwW). The fork's own line was dropped when it rebased onto959dcaf(5dbf5ce), so this is submitted here directly. The description below is the original one; its 'Verification' numbers refer to the fork tree. Rebased onto main63b902f.The problem
register_reading(IInputslot 0x40, RegisterReadingCallback) returned S_OK and a fabricated token while it never registers anything and the poll thread never calls reading callbacks (crates/victory-hle/src/modules/gameinput.rs:715-728).The platform refuses the registration. A title that checks the HRESULT (the normal pattern) falls back to polling when refused; the HLE told it success, so such a title can go event-driven and receive no input at all 鈥?silent total input loss. The current title polls and does not call slot 0x40, so it is unaffected.
Measured platform behaviour (offline, no game)
The host's
C:\Windows\System32\GameInput.dllwas called directly (Python ctypes;GameInputCreatereturned S_OK, thenIInputvtable slot 0x40):hr=0x80004001(E_NOTIMPL), the token was cleared from0xDEADBEEFDEADBEEFto 0;GameInputKindgamepad (0x40000): same;The change
Slot 0x40 clears a non-null token and returns E_NOTIMPL, exactly like the platform. Nothing else changes: reading callbacks are still not implemented, polling still drives the devices, and a caller that ignores the HRESULT sees an empty token (0) instead of a bogus one.
Evidence
New test
gameinput::tests::a_reading_callback_registration_is_refused_like_the_platform_does: old code returns S_OK and writes token 1; new code returns E_NOTIMPL and clears the token to 0.Verification (base
9a9091d):cargo test -p victory-hle --lib --locked -- --test-threads=1鈥?104 passed, 0 failedcargo clippy -p victory-hle --all-targets --locked -- -D warnings鈥?cleancargo clippy -p victory-hle --all-targets --locked --all-features -- -D warnings鈥?cleangit diff --checkclean; no new fmt diff (pre-existing crate fmt diffs only).Scope and overlap
One file,
crates/victory-hle/src/modules/gameinput.rs(+43/-4). No open PR covers it: #653 keeps the old shortcut unchanged, #534/#485 are registration ordering, #680 is xstore. CI'scheckmay be red from main's own clippy and asset-policy failures (#1440/#1322), which this diff does not touch.Verification on this tree (base
63b902f, 2026-11-27)63b902ffailed on those before this change.@Dukestar69 on GitHub · 2026-11-28 07:47 UTC · original · approved these changes
Tested locally merged onto
main(63b902f).cargo xtask policypassed (294 files ok).cargo test -p victory-hle --lib gameinputpassed (27 passed; 0 failed; 1 ignored, including the newa_reading_callback_registration_is_refused_like_the_platform_doestest) with 0 compiler warnings.Clean platform-parity fix for reading-callback registration. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).