XGameSave: the documented errors for a full disk and a small read buffer #429

Manually merged
github merged 2 commits from gh-pr/429/head into gh-pr/429/base 2026-11-26 04:03:36 +00:00
Owner

@⁠marquezinii on GitHub · 2026-11-24 03:15 UTC · original
marquezinii:fix/xgamesave-documented-errors → main · +38 −2 · 1 files · 2 commits · merged 2026-11-24 08:14 UTC

Two XGameSave results that differ from the documented error codes, one commit each:

A full host disk. Update::submit compared the update with min(quota left, disk free) and returned E_GS_QUOTA_EXCEEDED when it did not fit. The game saves errors page keeps the two apart: E_GS_OUT_OF_LOCAL_STORAGE is "the device has run out of room for save games [...] even if the game's per user storage quota has not been exceeded", while E_GS_QUOTA_EXCEEDED is the 256 MB per-user quota. A game shows different UI for each (delete saves vs free space on the device). The check is now a small no_room function: quota first, then the disk. The disk check no longer credits the bytes of replaced blobs, since commit writes the new version before it removes the old one. GetRemainingQuota is unchanged.

A small buffer for an async read result. XGameSaveReadBlobDataResult passed on XAsyncGetResult's E_NOT_SUFFICIENT_BUFFER. The function's errors include E_GS_PROVIDED_BUFFER_TOO_SMALL, which the synchronous read here already returns. The result stays in place, so a retry with a larger buffer still works (the test does that).

Tests: no_room gets a unit test for each case (disk short, quota short, a replacement that fits a full quota); the existing async read test first asks with an 8-byte buffer (before: 0x8007007A, now 0x80830007), then reads normally. cargo test -p victory-hle passes, including the kill-at-any-step test, and clippy reports nothing new.

https://learn.microsoft.com/gaming/gdk/docs/features/common/game-save/game-saves-errors
https://learn.microsoft.com/gaming/gdk/docs/reference/system/xgamesave/functions/xgamesavereadblobdataresult

**@⁠marquezinii** on GitHub · 2026-11-24 03:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/429) `marquezinii:fix/xgamesave-documented-errors` → `main` · +38 −2 · 1 files · 2 commits · merged 2026-11-24 08:14 UTC Two XGameSave results that differ from the documented error codes, one commit each: **A full host disk.** `Update::submit` compared the update with `min(quota left, disk free)` and returned `E_GS_QUOTA_EXCEEDED` when it did not fit. The game saves errors page keeps the two apart: `E_GS_OUT_OF_LOCAL_STORAGE` is "the device has run out of room for save games [...] even if the game's per user storage quota has not been exceeded", while `E_GS_QUOTA_EXCEEDED` is the 256 MB per-user quota. A game shows different UI for each (delete saves vs free space on the device). The check is now a small `no_room` function: quota first, then the disk. The disk check no longer credits the bytes of replaced blobs, since `commit` writes the new version before it removes the old one. `GetRemainingQuota` is unchanged. **A small buffer for an async read result.** `XGameSaveReadBlobDataResult` passed on `XAsyncGetResult`'s `E_NOT_SUFFICIENT_BUFFER`. The function's errors include `E_GS_PROVIDED_BUFFER_TOO_SMALL`, which the synchronous read here already returns. The result stays in place, so a retry with a larger buffer still works (the test does that). Tests: `no_room` gets a unit test for each case (disk short, quota short, a replacement that fits a full quota); the existing async read test first asks with an 8-byte buffer (before: 0x8007007A, now 0x80830007), then reads normally. `cargo test -p victory-hle` passes, including the kill-at-any-step test, and clippy reports nothing new. https://learn.microsoft.com/gaming/gdk/docs/features/common/game-save/game-saves-errors https://learn.microsoft.com/gaming/gdk/docs/reference/system/xgamesave/functions/xgamesavereadblobdataresult
XGameSaveReadBlobDataResult lists E_GS_PROVIDED_BUFFER_TOO_SMALL among
its errors, and the synchronous read already returns it; the result
passed on XAsyncGetResult's E_NOT_SUFFICIENT_BUFFER instead.
An update that fit the user's 256 MB quota but not the host disk failed
with E_GS_QUOTA_EXCEEDED, which tells the player to delete saves. The
documentation keeps the two apart: E_GS_OUT_OF_LOCAL_STORAGE is the
device out of room and can come before the quota is reached. The disk
check also no longer credits the blobs an update replaces, since the
new version is written before the old one is removed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:03:33 +00:00
github manually merged commit f0ee35e9df into gh-pr/429/base 2026-11-26 04:03:36 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 03:33 UTC · original

Verified f0ee35e on Arch Linux x86_64 with the Windows build under Wine 11.22 (cargo xwin, x86_64-pc-windows-msvc, release, rustc 1.98.1):

  • victory-hle: 86 passed, 1 failed. The only failure is modules::net::tests::only_loopback_is_reachable — the known Wine WSAConnectByList environment gap (#217), unrelated.
  • The new a_full_disk_is_not_the_quota passes.

Not covered: a genuinely full host disk (the test uses the quota path) and title behaviour (no game data here).

**@⁠DaviTostes** on GitHub · 2026-11-24 03:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/429#issuecomment-7121213915) Verified `f0ee35e` on **Arch Linux x86_64** with the Windows build under **Wine 11.22** (`cargo xwin`, `x86_64-pc-windows-msvc`, release, rustc 1.98.1): - `victory-hle`: **86 passed, 1 failed**. The only failure is `modules::net::tests::only_loopback_is_reachable` — the known Wine `WSAConnectByList` environment gap (#217), unrelated. - The new `a_full_disk_is_not_the_quota` passes. Not covered: a genuinely full host disk (the test uses the quota path) and title behaviour (no game data here).
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!429
No description provided.