GameInput: answer IUnknown and own-IID queries on the COM objects #1641
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1641
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1641/head"
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?
@Calvix2k on GitHub · 2026-11-24 20:18 UTC · original
Calvix2k:codex/gameinput-query-interface-020→main· +122 −7 · 1 files · 1 commits · closed without mergingAddresses
VIC-BT-020from audit #1242.Summary
Replace the single
no_interfaceslot shared by all three GameInput vtables with per-objectQueryInterfacehandlers.Each handler accepts
IID_IUnknownand the object's own GUID fromGameInput.h:IGameInput11BE2A7E-4254-445A-9C09-FFC40F006918IGameInputDevice31DD86FB-4C1B-408A-868F-439B3CD47125IGameInputReading2156947A-E1FA-4DE0-A30B-D812931DBD8DOn success AddRef through the object's own slot 1, so readings stay reference counted; on failure
*outis cleared and the call returnsE_NOINTERFACE.Null required pointers and a null
*outreturnE_POINTER.A query for another object's IID is refused (
IGameInputDevicedoes not answerIID_IGameInput).Tests
New test
query_interface_answers_identity_and_the_objects_own_iidwalks the input object, a device and a reading, checking:IID_IUnknownand the object's own IID returnS_OKwith identity.E_NOINTERFACEand nulls a sentinelout.out/ null IID returnE_POINTER.QueryInterfaceAddRef.Validation
cargo test -p victory-hle --locked -- --test-threads=1— passed (95 unit tests and 1 integration test).cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings— passed.cargo xtask policy— passed (154 files).@pfhandler on GitHub · 2026-11-24 20:54 UTC · original
Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB):
VICTORY_NO_HOST_PAD=1— a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad letsVICTORY_KEYSdrive the title again.VICTORY_MODE=1920x1080— the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here).Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above.
@Calvix2k on GitHub · 2026-11-24 20:59 UTC · original
Thanks — these are unrelated to this PR, so I upstreamed them separately with you credited:
VICTORY_MODEis now #1701 (validatedWxH, falls back to 3840x2160) andVICTORY_NO_HOST_PADis #1702 (read once, logs that pads are ignored).@BaggyALPHA on GitHub · 2026-11-24 22:42 UTC · original
I followed up on the v0 device table review. A Windows regression test failed on the current PR because the SDK interface has 22 slots and the device table has 21. A local correction passed all 8 GameInput tests and HLE Clippy with all targets and features.
The correction makes both the table and Device's table reference 22 entries, uses typed false-returning stubs for IsForceFeedbackMotorPoweredOn at slot 7 and AcquireExclusiveRawDeviceAccess at slot 20, and adds a typed void no-op for ReleaseExclusiveRawDeviceAccess at slot 21. The test queries the device IID first, then calls those slots with the signatures from the Windows SDK header. It uses a synthetic device.
AI-assisted (Codex).
@Marvisak on GitHub · 2026-11-25 01:22 UTC · original
Automated triage for the maintainers. Closing because it breaks a repository rule (see
docs/asset-policy.mdand the project rules): nothing taken from the console SDK or the game, no weakening of the asset policy, and the title stays offline.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
@Calvix2k on GitHub · 2026-11-25 01:26 UTC · original
Re-landed as #1942 (this PR cannot be reopened). It carries BaggyALPHA's 22-slot device-table correction: IsForceFeedbackMotorPoweredOn (0x38) and AcquireExclusiveRawDeviceAccess (0xa0) return false, ReleaseExclusiveRawDeviceAccess (0xa8) is a void no-op. Tests 10/10, clippy/policy pass. The triage closure looks like a false positive: the IIDs are public Windows SDK GameInput.h constants, only gameinput.rs changes.
Pull request closed