Repository navigation
Conversation
IGameInput, IGameInputDevice and IGameInputReading shared one slot 0 that always returned E_NOINTERFACE and never touched *out. Each object now answers IID_IUnknown and its own interface GUID from GameInput.h, AddRefs through its own slot 1 (so readings stay reference counted), clears *out on failure and returns E_POINTER for null required pointers. Add a test that exercises both paths on all three objects, including the null-out and null-IID cases. Addresses VIC-BT-020 from audit Marvisak#1242. Validation: - cargo test -p victory-hle --locked -- --test-threads=1 - cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings - cargo xtask policy
BaggyALPHA's follow-up on the v0 table review: the Windows SDK interface has 22 slots and the device table stopped at 21. IsForceFeedbackMotorPoweredOn (0x38) and AcquireExclusiveRawDeviceAccess (0xa0) now answer false, and ReleaseExclusiveRawDeviceAccess (0xa8) is a typed void no-op, so a title that calls them gets an answer instead of E_NOTIMPL at the wrong slot. Reported-by: BaggyALPHA <BaggyALPHA@users.noreply.github.com>
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
GameInput: answer IUnknown and own-IID queries: COM identity fix — pairs with #1641's earlier GameInput IUnknown work.
|
Automated triage for the maintainers. Needs work: needs the maintainer's decision. The head ( On the replies (yours and BaggyALPHA's): agreed that the open question is the policy call, not the code. The three interface ids are the same kind of constant CI: passing ( Generated by Claude Code |
The repository does not name the console SDK or quote its headers. Rename the three ids the way media.rs names its own (`INPUT_IID`, `DEVICE_IID`, `READING_IID`), drop the header name from the doc comment, and describe the typed stubs by what they do instead of by the methods' names.
|
Thanks — the wording half is done, and I agree the rest is the maintainer's call. One note to make that call easier, since the triage lists three PRs for the same slot:
On the asset policy: the three ids are the same kind of interoperability constants The commit message from |
|
On the asset-policy question this inherited from #1641: the constants are public PC API surface, and I have an interest to declare: my #1329 is the narrow alternative to this PR, so if this one is acceptable mine is redundant and I will close it. That cuts against me, which is why I would rather the question were settled on facts than left to sit. What actually closed #1641. The closure was automated triage, with the generic line "nothing taken from the console SDK or the game", and it invites correction: "If this is mistaken, reply here with what was missed". No human review found a specific violation, and @Calvix2k already called it a likely false positive. 1. GameInput is a public PC API, not console SDK material. Microsoft documents 2.
3. Against the policy's own wording. docs/asset-policy.md forbids the title's assets and executable and anything derived from them, and explicitly allows "small interoperability constants (magic numbers, enum values) we write" and "per-build offsets of functions we hook, under names we choose". Nothing here comes from the title's executable. 4. Provenance of the 22-slot correction, since it is mine. I derived it from the signatures in the public header and verified it against a synthetic device in a Windows test, not from the title's binary — eight GameInput tests passed at the time. If anything in this PR were going to be game-derived it would be that piece, and it is not. So on the evidence the stated ground for closing #1641 does not appear to apply here, and this PR's constants match accepted practice in the tree. Whether that is the right call is still the maintainer's, and I am not asking for a verdict in this thread — only that the question not be the thing that keeps VIC-BT-020 unfixed. No game files were used for any of the above: it is the public documentation, the policy text, and AI-assisted (Claude Code). |
|
Agree with the analysis, and it matches what I said when #1641 was closed: the closure there was a false positive on the policy. The constants are public PC API ( So the only open question is the merge decision, not the policy. If this lands, #1329 can close; I will leave that call to @Marvisak. |
…n the COM objects (re-lands Marvisak#1641)
Re-lands #1641 (closed by the automated triage as an asset-policy violation, which I believe is a false positive: the three IIDs are constants from the public Windows SDK GameInput.h, not console SDK code or game assets; the change touches only crates/victory-hle/src/modules/gameinput.rs, and cargo xtask policy passes on the rebased tree. If the IID constants are what tripped it, please say so and I will put them behind a generator from the installed SDK header instead.)
What
IGameInput, IGameInputDevice and IGameInputReading shared one
o_interface slot. Each now has its own QueryInterface that accepts IID_IUnknown and its own interface id (GameInput.h), AddRefs through slot 1, and returns E_NOINTERFACE/E_POINTER otherwise.
BaggyALPHA's follow-up from the v0 table review is included: the Windows SDK device interface has 22 slots, and the table stopped at 21.
The regression test queries the device IID first, then calls the three slots with the SDK signatures on a synthetic device.
Verification (Windows 10, Ryzen 7 5800X / RX 7800 XT)