Repository navigation
feat(libSceSaveData): implement sceSaveDataGetConvertProgress - #4708
Conversation
adriadam10
left a comment
There was a problem hiding this comment.
Thanks. The signature int32_t sceSaveDataGetConvertProgress(float *progress) matches the SDK 12.000 reference, and the test fails on main as expected. Two behaviours in that reference differ from the PR:
Export.cpp:803-809: it always reports1.0f. The reference says the value is0.0before anysceSaveDataConvert(), the final value after a successful one, and< 1.0if the conversion failed. Keep the last convert's progress (e.g. 0.0 initially, 1.0 after a successfulsceSaveDataConvert, left below 1.0 when it fails) and pin each case inGuestSaveDataConvert.cpp; the test currently queries before the convert and expects 1.0.Export.cpp:803: noSAVE_DATA_ERROR_NOT_INITIALIZED(0x809f0001) when the library isn't initialized, which the reference lists next toPARAMETER. Check how the sibling exports do it and add a test case.
In docs/dev/debt/libSceSaveData.native.md:8, cite the SDK page you took the signature from (a link), and update the line for the behaviour above.
45cbdbb to
a81a5ba
Compare
|
Updated in the amended commit:
|
a81a5ba to
b078f47
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Checked the signature and error codes against the SDK reference, the new test fails on main without the change and passes with it, and the scoped build and ctest are green after rebasing onto current main. The only conflict was the TechnicalDebt line in docs/dev/debt/libkernel.md, which I resolved by dropping sceSaveDataGetConvertProgress from the Coredump entry; merging.
What
Implements
sceSaveDataGetConvertProgress(NID8EA5OMIL1lQ) inlibSceSaveData.native.On current
main, Minecraft Dungeons II (PPSA16064) importssceSaveDataGetConvertProgressand stops with:Signature and error codes follow the SDK 12.000 reference.
Save data conversion on AnyPS5 (
sceSaveDataConvert) runs synchronously on the host filesystem.sceSaveDataGetConvertProgressvalidates the output pointer (returningSAVE_DATA_ERROR_PARAMETERif null), verifies library initialization (returningSAVE_DATA_ERROR_NOT_INITIALIZEDif uninitialized), and writes the last conversion's progress (0.0fbefore any conversion or when conversion fails,1.0fafter successful conversion), returningSAVE_DATA_OK(0).Adds test coverage in
guest_savedata_convert_testsverifying parameter validation, uninitialized error handling before initialize and after terminate, initial 0.0f progress, and progress after successful and failed conversions. Documents technical debt indocs/dev/debt/libSceSaveData.native.mdand removes the unknown signature entry fromdocs/dev/debt/libkernel.md.Tested
guest_savedata_convert(passed in 0.01s)guest_savedata_*integration tests passed (100%)guest_savedata_convert_testsaborts onmainbefore this change withstd::runtime_error: sceSaveDataGetConvertProgress not implementedpython3 tools/check_conventions.py --base upstream/mainpassedpython3 tools/check_test_registration.py buildpassed (0 unrecorded)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)