HLE: return XAsync payloads for nonnegative results #520

Manually merged
github merged 1 commit from gh-pr/520/head into gh-pr/520/base 2026-11-26 04:06:58 +00:00
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 04:25 UTC · original
Quat3rnion:victory-xasync-payload → main · +54 −3 · 1 files · 1 commits · merged 2026-11-24 08:17 UTC

What

XAsyncGetResultSize and XAsyncGetResult treated only S_OK as success.
A provider that completed with S_FALSE (or any other nonnegative HRESULT)
and a payload left the caller's size and result buffers untouched, and never
released the call. Any nonnegative completion is a success and carries its
result. Both entry points now use that rule, so the payload is written, the
bytes-used count is reported and the call ends.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 165 passed, 0 failed, 3 ignored. A new regression completes a call with S_FALSE and an eight-byte payload, then checks the status, size, result value, used count and that the call is released.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here.
  • cargo xtask policy passes (150 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
**@⁠Quat3rnion** on GitHub · 2026-11-24 04:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/520) `Quat3rnion:victory-xasync-payload` → `main` · +54 −3 · 1 files · 1 commits · merged 2026-11-24 08:17 UTC ## What `XAsyncGetResultSize` and `XAsyncGetResult` treated only `S_OK` as success. A provider that completed with `S_FALSE` (or any other nonnegative HRESULT) and a payload left the caller's size and result buffers untouched, and never released the call. Any nonnegative completion is a success and carries its result. Both entry points now use that rule, so the payload is written, the bytes-used count is reported and the call ends. An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace`: 165 passed, 0 failed, 3 ignored. A new regression completes a call with `S_FALSE` and an eight-byte payload, then checks the status, size, result value, used count and that the call is released. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. No Windows host here. - `cargo xtask policy` passes (150 files ok). No game files or data from them were added. ## Checklist - [x] Workspace tests and Windows cross-check pass. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
GetResultSize and GetResult only treated S_OK as success, so a provider finishing with S_FALSE and a payload left the caller's buffers untouched and the call registered forever. Any nonnegative HRESULT is a success code; return the size, let the provider write the result, report bytes used, and release the call. Add a regression completing with S_FALSE and an eight-byte payload.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:06:58 +00:00
github manually merged commit 3e39eac1c5 into gh-pr/520/base 2026-11-26 04:06:58 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!520
No description provided.