mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
cellSaveData: Fix loss of "BLIST" and files' information in PARAM.SFO (#8706)
This commit is contained in:
parent
57471f8c94
commit
0c85d4c0d0
1 changed files with 15 additions and 16 deletions
|
@ -1419,22 +1419,17 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update PARAM.SFO
|
// Update PARAM.SFO
|
||||||
psf.clear();
|
psf::assign(psf, "ACCOUNT_ID", psf::array(16, "0000000000000000")); // ???
|
||||||
psf.insert(
|
psf::assign(psf, "ATTRIBUTE", statSet->setParam->attribute.value());
|
||||||
{
|
psf::assign(psf, "CATEGORY", psf::string(4, "SD")); // ???
|
||||||
{ "ACCOUNT_ID", psf::array(16, "0000000000000000") }, // ???
|
psf::assign(psf, "PARAMS", psf::string(1024, {})); // ???
|
||||||
{ "ATTRIBUTE", statSet->setParam->attribute.value() },
|
psf::assign(psf, "PARAMS2", psf::string(12, {})); // ???
|
||||||
{ "CATEGORY", psf::string(4, "SD") }, // ???
|
psf::assign(psf, "PARENTAL_LEVEL", statSet->setParam->parental_level.value());
|
||||||
{ "PARAMS", psf::string(1024, {}) }, // ???
|
psf::assign(psf, "DETAIL", psf::string(CELL_SAVEDATA_SYSP_DETAIL_SIZE, statSet->setParam->detail));
|
||||||
{ "PARAMS2", psf::string(12, {}) }, // ???
|
psf::assign(psf, "SAVEDATA_DIRECTORY", psf::string(CELL_SAVEDATA_DIRNAME_SIZE, save_entry.dirName));
|
||||||
{ "PARENTAL_LEVEL", statSet->setParam->parental_level.value() },
|
psf::assign(psf, "SAVEDATA_LIST_PARAM", psf::string(CELL_SAVEDATA_SYSP_LPARAM_SIZE, statSet->setParam->listParam));
|
||||||
{ "DETAIL", psf::string(CELL_SAVEDATA_SYSP_DETAIL_SIZE, statSet->setParam->detail) },
|
psf::assign(psf, "SUB_TITLE", psf::string(CELL_SAVEDATA_SYSP_SUBTITLE_SIZE, statSet->setParam->subTitle));
|
||||||
{ "SAVEDATA_DIRECTORY", psf::string(CELL_SAVEDATA_DIRNAME_SIZE, save_entry.dirName) },
|
psf::assign(psf, "TITLE", psf::string(CELL_SAVEDATA_SYSP_TITLE_SIZE, statSet->setParam->title));
|
||||||
{ "SAVEDATA_LIST_PARAM", psf::string(CELL_SAVEDATA_SYSP_LPARAM_SIZE, statSet->setParam->listParam) },
|
|
||||||
{ "SUB_TITLE", psf::string(CELL_SAVEDATA_SYSP_SUBTITLE_SIZE, statSet->setParam->subTitle) },
|
|
||||||
{ "TITLE", psf::string(CELL_SAVEDATA_SYSP_TITLE_SIZE, statSet->setParam->title) }
|
|
||||||
});
|
|
||||||
|
|
||||||
has_modified = true;
|
has_modified = true;
|
||||||
}
|
}
|
||||||
else if (save_entry.isNew)
|
else if (save_entry.isNew)
|
||||||
|
@ -1467,6 +1462,8 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
||||||
return {CELL_SAVEDATA_ERROR_PARAM, "50"};
|
return {CELL_SAVEDATA_ERROR_PARAM, "50"};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cellSaveData.warning("savedata_op(): Recreating savedata. (mode=%d)", statSet->reCreateMode);
|
||||||
|
|
||||||
// Clear secure file info
|
// Clear secure file info
|
||||||
for (auto it = psf.cbegin(), end = psf.cend(); it != end;)
|
for (auto it = psf.cbegin(), end = psf.cend(); it != end;)
|
||||||
{
|
{
|
||||||
|
@ -1718,6 +1715,8 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
cellSaveData.warning("savedata_op(): Fileop: file=\"%s\", type=%d, op=%d", file_path, fileSet->fileType, fileSet->fileOperation);
|
||||||
|
|
||||||
if ((file_path == "." || file_path == "..") && fileSet->fileOperation <= CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC)
|
if ((file_path == "." || file_path == "..") && fileSet->fileOperation <= CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC)
|
||||||
{
|
{
|
||||||
savedata_result = CELL_SAVEDATA_ERROR_BROKEN;
|
savedata_result = CELL_SAVEDATA_ERROR_BROKEN;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue