feat(xgameruntime): implement XGameSaveFiles on the XGameSave folder #40
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!40
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/40/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?
@CaseReed on GitHub · 2026-11-22 19:41 UTC · original
CaseReed:feat/xgamesavefiles→main· +397 −15 · 9 files · 1 commits · closed without mergingWhat
Implements the three functions of #21, the whole issue:
XGameSaveFilesGetFolderWithUiAsync,XGameSaveFilesGetFolderWithUiResult,XGameSaveFilesGetRemainingQuota. Signatures and behaviour come from the public GDK documentation (function pages, overview, error table); nothing is measured on a console, and every choice the documentation does not state is in the debt fragment.%LOCALAPPDATA%\AnyBox\<TitleId>\XGameSave\, as the issue asks: UTF-8, ending in a backslash, without the\?\prefix. Its containers are the subfolders. XGameSave only writes top-level.xgsfiles there (a/in a container name is stored as%), so the two cannot collide, and the documentation says top-level files are ignored by XGameSaveFiles. No UI is shown: there is no cloud to sync with. The user and the SCID are handled as in XGameSave (user ignored, SCID only checked for null).XGameSaveGetRemainingQuotaand the XGameSave submit check use the same count. What the title writes itself with Win32 calls is not limited; the remaining quota is 0 once the folder is over.E_GS_PROVIDER_MISMATCH(0x8083000F). The first successfulXGameSaveInitializeProvider,XGameSaveInitializeProviderAsyncorXGameSaveFilesGetFolderWithUiAsyncpicks the system for the life of the process; a call that fails picks nothing, so a title can fall back to the other API. The error table also says "Only one type of Game Saves API can be initialized at a time within a title", which may mean closing the provider lifts it on a console; AnyBox keeps the choice. This adds a check to the two XGameSave initialize functions, which cannot affect a title that only uses XGameSave.XGameSaveFilesGetFolderWithUiAsyncstops withAbxUnsupportedon a folder holding.xgscontainers, and the XGameSave initialize functions stop on a folder with a subfolder that holds a file (empty subfolders are ignored). A folder link (reparse point) inside the save folder also stops, since following it could loop or leave the folder.Two existing XGameSave debt entries change with this (quota counting, and the unknown-file stop now limited to
.xgsfiles); the fragment updates both.If #39 merges first, the scenario lists in
CMakeLists.txtandARCHITECTURE.mdwill conflict; I will rebase.Tested
Windows 11, MSVC 19.38 (VS 2022), Ninja, Release, clean build directory, with #38 applied locally only to get MSVC to build (not part of this PR):
pipeline_probeskipped: no Khronos validation layer on this machine). Six new e2e scenarios:gamesavefiles,gamesavefiles_mismatch,gamesavefiles_containers,gamesave_folders,gamesave_folders_async,gamesave_empty_folder. The three stop scenarios also check part of the stop message.gamesave*andasync*scenarios repeated 30 times: 330/330.python tools/check_conventions.py,python tools/debt_fold.py --checkpass.GameSave.cppandFakeTitle.cppcompile with-Wall -Wextraand no warning on MinGW-w64 GCC 13.1 and 16.2 (Compiler Explorer).Not tested:
FSCTL_SET_SPARSE); it fails, rather than skips, on a volume without sparse files.Self-review: an independent pass over the diff against the documentation found no signature or ABI issue. It found that the reparse-point stop also hit plain files of XGameSave-only titles, that an empty subfolder stopped XGameSave, that a vanished subfolder failed the quota call, and that a failed first call claimed the save system; all four are fixed in this commit.
Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md🤖 Generated with Claude Code
@github-actions[bot] on GitHub · 2026-11-22 19:41 UTC · original
Progress report (
9486199→d027b13)📈 Libraries: 25.67% (+0.6696%, +3 implemented functions)
✅ 3 implemented
XGameSaveFilesGetFolderWithUiAsyncXGameSaveFilesGetFolderWithUiResultXGameSaveFilesGetRemainingQuotaChanged libraries
@Dark3581 on GitHub · 2026-11-22 20:50 UTC · original · reviewed
Reviewed — looks good, needs a rebase
Folder, quota and the one-system-per-process rule are all sourced or listed in the fragment. The code is ready; the branch needs a rebase onto
mainfirst, since #39 just landed. Please rebase and push, and I will merge it.What I ran
Head
d027b13, merged onto currentmain. Windows 10, MinGW (WinLibs GCC 15.2 UCRT), Ninja, Release, clean build directory, NTFS volume.Results
e2e_gamesave*ande2e_async*repeatedcheck_conventions.pydebt_fold.py --checkFindings
Blocking
None.
Non-blocking
core/libs/tests/CMakeLists.txtanddocs/dev/ARCHITECTURE.md, so this branch now conflicts withmain. Keeping both sets of scenarios is all it takes; after the rebase,ctestandpython tools/debt_fold.py --checkshould still pass with both fragments.Not verified
MSVC, the three races you list as untestable, and a volume without sparse files.
Thanks — the stops on mixed folders keep a title from silently losing saves, which is what matters here.
@github-actions[bot] on GitHub · 2026-11-22 22:12 UTC · original
This pull request conflicts with
main. Rebase it on currentmainand force-push the branch; the label is removed automatically once it merges cleanly.@Dark3581 on GitHub · 2026-11-23 00:02 UTC · original · approved these changes
Approving: the code was ready, as the earlier review said. Since #39 landed first, I rebased this myself so you did not have to wait.
@Dark3581 on GitHub · 2026-11-23 00:02 UTC · original
Landed on
mainas013dc10(through #58, a rebase merge, so the commit is yours: you are its author). The only changes from this branch are the conflict resolutions with #39 in the scenario lists ofcore/libs/tests/CMakeLists.txt,FakeTitle.cppandARCHITECTURE.md, which now hold both sets. Retested on the rebased commit: 72/72 ctest, the gamesave, taskqueue and async e2e scenarios 30 times each, conventions and debt checks. Thank you for the work on this one.Pull request closed