feat(libSceSaveData): initialize through sceSaveDataInitialize2 #12625
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12625"
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?
Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-10-28T23:24:02Z.
What
Implements
sceSaveDataInitialize2assceSaveDataInitialize3with the same parameter, the waysceSaveDataInitializealready forwards. A title that initializes through the v2 entry point now starts the same save-data session, andsceSaveDataTerminateends it.Sources agree that the three initialize entry points are one operation:
Initialize2andInitialize3;InitializeandInitialize2to one common initializer.Nothing is measured on a console. The public header gains the parameter, and
Initialize2comes out of the pending-declaration list in the debt file. That list, a single entry of over 6,000 characters, is split into three entries under the length limit, with the same wording and names.Depends on #10674, which edits the same debt list line. This branch is #10674's head with current
mainmerged in, plus one commit.The new
TestInitialize2inGuestSaveDataPs4.cpplooks the call up at runtime, becausemaindeclares it without parameters. It checks that save-data memory setup is refused before the call, works after it, and is refused again aftersceSaveDataTerminate.guest_savedata_ps4_testsnow links${CMAKE_DL_LIBS}fordlsym.Tested
After the sync with
main(8197ab33fd, a debt-text conflict only), Windows 11 and WSL2 reran it: all 7guest_savedata*tests pass, withguest_savedata_ps43 of 3 on--repeat until-fail:3, and no warnings in the changed files. They also pass merged intomainee9a9a66cf. The earlier runs follow.Windows 11 Home 25H2 (i7-11800H, WinLibs MinGW-w64 GCC 15.2.0 UCRT r7, CMake 4.3.1, Ninja 1.13.2, Release,
BUILD_TESTING=ON) and Ubuntu 24.04.5 on WSL2 (GCC 13.3.0, CMake 3.28.3), both atbc6a5e4ea1merged intomain3a2b919816(clean merge):ctest -R "^guest_savedata|^savedata_":100% tests passed, 0 tests failed out of 13on both hosts.savedata_memory_growth_read_failureis skipped on Linux, as always.guest_savedata_ps4with--repeat until-fail:3: 3 of 3 on both hosts.mainwith only this test file and the${CMAKE_DL_LIBS}line,guest_savedata_ps4builds and then aborts withsceSaveDataInitialize2 not implementedon both hosts (Windows exit 0xc0000409).libSceSaveData/include/Api.hppbuilds on both hosts.tools/check_conventions.pypasses. Rechecked on reopening againstmainb9bf246ea2:git merge-treemerges this cleanly withmain. It overlaps #12748 and #13551 in thelibSceSaveData.nativedebt line #10674 also edits. It also overlaps #14150 on one neighbouringinclude/Api.hppdeclaration. #14150 implementssceSaveDataGetMountedSaveDataCount, not this export. Whichever merges second needs a one-line rebase.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T01:55:49Z.
Review: APPROVED
Windows 11, WinLibs GCC 15.2.0 r7, Release. Head
8197ab33fdmerged into upstream/main93dbd0f82a:ctest -R '^guest_savedata': 8/8 pass, includingguest_savedata_ps4with the newTestInitialize2andguest_savedata_dialog.libSceSaveData.native/Export.cppandlibSceSaveData/include/Api.hpp,guest_savedata_ps4aborts withsceSaveDataInitialize2 not implemented. So the test reaches the export through the runtime lookup, as intended.tools/check_conventions.py --base upstream/main --head 8197ab33fd: passes. The split debt entries clear #10674'sdebt-lengthwarning.Forwarding to
sceSaveDataInitialize3, assceSaveDataInitializealready does, matches the three references you list. I approved #10674, which this builds on, separately.