From 348c6a16da7d2e5d88cc59a0387ec83afea3df8e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 15 Feb 2014 09:43:43 -0800 Subject: [PATCH] If a focus mode is used with autoload, ignore it. Before, if the "focused" save did not exist, we failed incorrectly, even though the actual save we were trying to load was the correct one. --- Core/Dialog/SavedataParam.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index 414a5cb446..2125dfa356 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -287,12 +287,8 @@ bool SavedataParam::Delete(SceUtilitySavedataParam* param, int saveId) } std::string dirPath = GetSaveFilePath(param,saveId); - if (saveId >= 0 && saveNameListDataCount > 0) // if user selection, use it - { - if (saveDataList[saveId].size == 0) // don't delete no existing file - { - return false; - } + if (!pspFileSystem.GetFileInfo(dirPath).exists) { + return false; } pspFileSystem.RmDir(dirPath); @@ -506,12 +502,9 @@ bool SavedataParam::Load(SceUtilitySavedataParam *param, const std::string &save } std::string dirPath = GetSaveFilePath(param, GetSaveDir(param, saveDirName)); - if (saveId >= 0 && saveNameListDataCount > 0) // if user selection, use it - { - if (saveDataList[saveId].size == 0) // don't read no existing file - { - return false; - } + std::string filePath = dirPath + "/" + GetFileName(param); + if (!pspFileSystem.GetFileInfo(filePath).exists) { + return false; } if(!LoadSaveData(param, saveDirName, dirPath, secureMode)) // Load main savedata