Better fix for savedata and cellCamera improvements

This commit is contained in:
Raul Tambre 2015-07-14 14:45:31 +03:00
parent 66cf864ee0
commit ddcaf4972f
2 changed files with 18 additions and 20 deletions

View file

@ -351,24 +351,16 @@ never_inline s32 savedata_op(
{
if (!Emu.GetVFS().ExistsDir(dir_path) && !Emu.GetVFS().CreateDir(dir_path))
{
// Let's ignore this error for now
cellSysutil.Error("savedata_op(): Savedata directory creation failed.");
}
else
{
std::string rSfo_path = "/dev_hdd0/game/" + save_entry.dirName.substr(0, 9) + "/PS3_GAME/PARAM.SFO"; // The real SFO path
if (!Emu.GetVFS().ExistsFile(rSfo_path))
{
rSfo_path = "/dev_hdd0/game/" + save_entry.dirName.substr(0, 9) + "/PARAM.SFO";
}
vfsFile rSfo(rSfo_path);
PSFLoader rPsf(rSfo);
psf.Clear();
psf.SetInteger("ATTRIBUTE", rPsf.GetInteger("ATTRIBUTE"));
psf.SetString("TITLE", rPsf.GetString("TITLE"));
psf.SetString("SUB_TITLE", rPsf.GetString("SUB_TITLE"));
psf.SetString("DETAIL", rPsf.GetString("DETAIL"));
psf.SetString("SAVEDATA_LIST_PARAM", rPsf.GetString("SAVEDATA_LIST_PARAM"));
// Is loading the PARAM.SFO really necessary? Setting empty stuff seems to fix a couple games.
psf.SetInteger("ATTRIBUTE", 0);
psf.SetString("TITLE", "");
psf.SetString("SUB_TITLE", "");
psf.SetString("DETAIL", "");
psf.SetString("SAVEDATA_LIST_PARAM", "");
}
}