xcrd: accept the GDK 2504 DirectStorage factory IID #397

Open
andersonlucasg3 wants to merge 1 commit from upstream-pr/397 into main
andersonlucasg3 commented 2026-12-03 00:55:24 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by andersonlucasg3 on 2026-12-03T00:55:24Z.


Library / area: crates/compat/xcrdapi — DStorageGetFactory / IDStorageFactoryX::QueryInterface.

Exports changed (exports.txt rows): none.

Source of the behaviour: the GDK 2504 revision requests the DirectStorage factory with the newer factory IID {62959d11-d45f-4884-a0a3-f7862ea243ae}. It names the same IDStorageFactoryX singleton as the existing IID, so answering it with the same factory object keeps the storage backend working without a vtable or layout change.

Change: add IID_FACTORY_X_GDK2504 next to the existing factory IID in the same iid(...) encoding, accept it in factory_qi, and return the same singleton factory; the unit test covers both factory IIDs (same pointer) and an unrelated IID (E_NOINTERFACE).

Evidence: before, the storage factory request with the newer IID returned hr=0x80004002 (E_NOINTERFACE) and storage setup could not come up; after, the same call returns hr=0x00000000 and storage setup proceeds. No factory object or vtable layout change.

  • cargo test -p xcrdapi gdk_2504_factory_iid_reaches_the_same_factory passes; the rest of the crate suite needs console DLL fixtures that are not on this machine
  • No game or console files and no binaries included
  • No fake success; anything not possible is left missing with a note
<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:5617567401 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/397). Originally posted by [andersonlucasg3](https://github.com/andersonlucasg3) on 2026-12-03T00:55:24Z. --- **Library / area:** `crates/compat/xcrdapi` — `DStorageGetFactory` / `IDStorageFactoryX::QueryInterface`. **Exports changed (exports.txt rows):** none. **Source of the behaviour:** the GDK 2504 revision requests the DirectStorage factory with the newer factory IID `{62959d11-d45f-4884-a0a3-f7862ea243ae}`. It names the same `IDStorageFactoryX` singleton as the existing IID, so answering it with the same factory object keeps the storage backend working without a vtable or layout change. **Change:** add `IID_FACTORY_X_GDK2504` next to the existing factory IID in the same `iid(...)` encoding, accept it in `factory_qi`, and return the same singleton factory; the unit test covers both factory IIDs (same pointer) and an unrelated IID (`E_NOINTERFACE`). **Evidence:** before, the storage factory request with the newer IID returned `hr=0x80004002` (`E_NOINTERFACE`) and storage setup could not come up; after, the same call returns `hr=0x00000000` and storage setup proceeds. No factory object or vtable layout change. - [x] `cargo test -p xcrdapi gdk_2504_factory_iid_reaches_the_same_factory` passes; the rest of the crate suite needs console DLL fixtures that are not on this machine - [x] No game or console files and no binaries included - [x] No fake success; anything not possible is left `missing` with a note
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/397:upstream-pr/397'
git switch 'upstream-pr/397'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/397'
git switch 'upstream-pr/397'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/397'
git switch 'upstream-pr/397'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/397'
git switch 'main'
git merge --squash 'upstream-pr/397'
git switch 'main'
git merge --ff-only 'upstream-pr/397'
git switch 'main'
git merge 'upstream-pr/397'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
omonkeyz/xbox-emulator!397
No description provided.