HLE: clear DirectStorage outputs and validate call arguments #13

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

@⁠davutsimsekk on GitHub · 2026-11-25 19:04 UTC · original
davutsimsekk:fix/hle-out-pointers-and-identity → main · +151 −5 · 5 files · 1 commits · open

Fixes the HLE argument and identity mismatches found by comparing the runtime against the GDK contracts.

  • DStorageGetFactory, OpenFile, CreateStatusArray and CreateQueue clear *out before any failure, as _COM_Outptr_ requires.
  • XSystemGetConsoleId returns the documented retail value 00000000.00000000.00000000.00000000.00 instead of a 38-digit string.
  • XAsyncBegin returns E_NO_TASK_QUEUE when the block has no queue and the process queue has been cleared.
  • XUserGetGamertag returns E_INVALIDARG for an unknown component instead of treating it as the classic name.

Tested

  • cargo test -p victory-hle --lib --locked: 104 passed.
  • cargo test -p victory-hle --test xasync_task_queue --locked: 1 passed.
  • Windows 11, Rust 1.98.1, locked offline build.

Not tested

  • No in-game run; no game files or console dump was used.

AI use

  • Automated coding agent for analysis, patch preparation and test runs.
**@⁠davutsimsekk** on GitHub · 2026-11-25 19:04 UTC · [original](https://github.com/rpatty-dev/PercyScarlett/pull/13) `davutsimsekk:fix/hle-out-pointers-and-identity` → `main` · +151 −5 · 5 files · 1 commits · open Fixes the HLE argument and identity mismatches found by comparing the runtime against the GDK contracts. - `DStorageGetFactory`, `OpenFile`, `CreateStatusArray` and `CreateQueue` clear `*out` before any failure, as `_COM_Outptr_` requires. - `XSystemGetConsoleId` returns the documented retail value `00000000.00000000.00000000.00000000.00` instead of a 38-digit string. - `XAsyncBegin` returns `E_NO_TASK_QUEUE` when the block has no queue and the process queue has been cleared. - `XUserGetGamertag` returns `E_INVALIDARG` for an unknown component instead of treating it as the classic name. **Tested** - `cargo test -p victory-hle --lib --locked`: 104 passed. - `cargo test -p victory-hle --test xasync_task_queue --locked`: 1 passed. - Windows 11, Rust 1.98.1, locked offline build. **Not tested** - No in-game run; no game files or console dump was used. **AI use** - Automated coding agent for analysis, patch preparation and test runs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:22:06 +00:00
This pull request can be merged automatically.
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/13/head:github-bot/gh-13'
git switch 'github-bot/gh-13'

Merge

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