mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 20:15:03 +00:00
small fix in sceSaveDataGetEventResult and sceAppContentTemporaryDataMount2.
This commit is contained in:
parent
13b9469af4
commit
427a7aa407
@ -198,6 +198,8 @@ int PS4_SYSV_ABI sceAppContentTemporaryDataMount() {
|
||||
|
||||
int PS4_SYSV_ABI sceAppContentTemporaryDataMount2(OrbisAppContentTemporaryDataOption option,
|
||||
OrbisAppContentMountPoint* mountPoint) {
|
||||
if (std::string_view(mountPoint->data).empty()) // causing issues with save_data.
|
||||
return ORBIS_APP_CONTENT_ERROR_PARAMETER;
|
||||
auto* param_sfo = Common::Singleton<PSF>::Instance();
|
||||
std::string id(param_sfo->GetString("CONTENT_ID"), 7, 9);
|
||||
const auto& mount_dir = Common::FS::GetUserPath(Common::FS::PathType::TempDataDir) / id;
|
||||
|
@ -248,20 +248,12 @@ int PS4_SYSV_ABI sceSaveDataGetEventInfo() {
|
||||
|
||||
int PS4_SYSV_ABI sceSaveDataGetEventResult(const OrbisSaveDataEventParam* eventParam,
|
||||
OrbisSaveDataEvent* event) {
|
||||
LOG_INFO(Lib_SaveData, "called sceSaveDataGetEventResult : null = {}", (eventParam == nullptr));
|
||||
if (eventParam == nullptr)
|
||||
return ORBIS_SAVE_DATA_ERROR_PARAMETER;
|
||||
// eventParam can be 0/null.
|
||||
if (event == nullptr)
|
||||
return ORBIS_SAVE_DATA_ERROR_NOT_INITIALIZED;
|
||||
|
||||
const auto& mount_dir = Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) /
|
||||
std::to_string(1) / game_serial; // fix me
|
||||
|
||||
Common::FS::IOFile file(mount_dir / "param.txt", Common::FS::FileAccessMode::Read);
|
||||
OrbisSaveDataParam* param = new OrbisSaveDataParam{};
|
||||
file.ReadRaw<u8>(param, sizeof(OrbisSaveDataParam));
|
||||
|
||||
LOG_INFO(Lib_SaveData, "called");
|
||||
LOG_INFO(Lib_SaveData, "called: Todo.");
|
||||
event->userId = 1;
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user