Commit Graph
7 Commits
Author SHA1 Message Date
Yunus Shaikh 36b5e96eb1 Merge feat/savedata-backup-progress-sourced into feat/libSceSaveData-event-callbacks 2026-10-30 23:09:35 +00:00
Yunus Shaikh 842f75d7e0 Merge main into feat/savedata-backup-progress-sourced
JJenkx's #13324 gives isMountedDirectory an std::error_code parameter.
The merge passes one in checkBackupData and restoreBackupData and
returns SAVE_DATA_ERROR_INTERNAL on a host error, as main's callers do.

GuestSaveDataMountStatus.cpp: CheckBackups writes param.json where
ResolvePath_nid_no_patch puts /app0/sce_sys/param.json, not under the
working directory. #13324's CheckHostMountFailures now resolves the
first guest path from its mount-host-failures subdirectory, so /app0
maps there, and checkBackupData didn't find the title's param.json.
2026-10-30 23:09:34 +00:00
Yunus Shaikh 629477b800 feat(libSceSaveData): deliver backup completions to a registered event callback
sceSaveDataRegisterEventCallback and sceSaveDataUnregisterEventCallback
were parameterless declarations that threw. They now follow shadPS4
#5226: registering before initialization is NOT_INITIALIZED, a null
callback is PARAMETER, a second registration replaces the callback and
its userdata, and unregistering needs no initialization.

Every backup completion that queues an event for
sceSaveDataGetEventResult, type 2 from sceSaveDataBackup and type 1 from
sceSaveDataUmountWithBackup, is queued for polling first and then handed
to the callback registered at that moment. A library thread delivers it:
sceSaveDataInitialize3 starts it with scePthreadCreate, as
libSceUsbStorage starts its monitor, so the callback runs on a guest
thread, and the last sceSaveDataTerminate joins it. Unregistering waits
for a running callback and drops completions not yet delivered, and a
terminate from inside the callback returns BUSY instead of joining its
own thread, as shadPS4 does.

guest_savedata_event_callback covers the errors, both event types, the
delivering thread, unregistration, replacement, a terminate from inside
the callback and an idle terminate followed by a restart.
2026-10-30 09:57:33 +00:00
Codex 2299b471cb feat(savedata): retain seven inventory exports within reviewed scope 2026-10-30 03:22:06 +02:00
Codex d058e59ffd feat(savedata): add missing cloud and sync inventory exports 2026-10-30 00:20:59 +02:00
Yunus Shaikh 5fed277cf2 feat(libSceSaveData): implement sceSaveDataCheckBackupData, sceSaveDataRestoreBackupData and sceSaveDataUmountWithBackup 2026-10-28 21:18:18 +00:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00