XGameSave: the documented errors for a full disk and a small read buffer #429
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!429
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/429/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?
@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 UTCTwo XGameSave results that differ from the documented error codes, one commit each:
A full host disk.
Update::submitcompared the update withmin(quota left, disk free)and returnedE_GS_QUOTA_EXCEEDEDwhen it did not fit. The game saves errors page keeps the two apart:E_GS_OUT_OF_LOCAL_STORAGEis "the device has run out of room for save games [...] even if the game's per user storage quota has not been exceeded", whileE_GS_QUOTA_EXCEEDEDis 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 smallno_roomfunction: quota first, then the disk. The disk check no longer credits the bytes of replaced blobs, sincecommitwrites the new version before it removes the old one.GetRemainingQuotais unchanged.A small buffer for an async read result.
XGameSaveReadBlobDataResultpassed onXAsyncGetResult'sE_NOT_SUFFICIENT_BUFFER. The function's errors includeE_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_roomgets 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-hlepasses, 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
@DaviTostes on GitHub · 2026-11-24 03:33 UTC · original
Verified
f0ee35eon 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 ismodules::net::tests::only_loopback_is_reachable— the known WineWSAConnectByListenvironment gap (#217), unrelated.a_full_disk_is_not_the_quotapasses.Not covered: a genuinely full host disk (the test uses the quota path) and title behaviour (no game data here).