Some renaming

This commit is contained in:
Henrik Rydgård 2024-07-16 17:07:11 +02:00
parent 4582ee692a
commit f18715bb7c
3 changed files with 16 additions and 16 deletions

View File

@ -114,7 +114,7 @@ int PSPSaveDialog::Init(int paramAddr)
Memory::Memcpy(&originalRequest, requestAddr, size);
param.SetIgnoreTextures(IsNotVisibleAction((SceUtilitySavedataType)(u32)request.mode));
param.ClearCaches();
param.ClearSFOCache();
int retval = param.SetPspParam(&request);
const u32 mode = (u32)param.GetPspParam()->mode;
@ -269,7 +269,7 @@ int PSPSaveDialog::Init(int paramAddr)
ChangeStatusInit(SAVEDATA_INIT_DELAY_US);
}
param.ClearCaches();
param.ClearSFOCache();
InitCommon();
UpdateButtons();
StartFade(true);
@ -651,7 +651,7 @@ int PSPSaveDialog::Update(int animSpeed)
param.SetPspParam(&request);
}
param.ClearCaches();
param.ClearSFOCache();
UpdateButtons();
UpdateFade(animSpeed);
@ -1060,13 +1060,13 @@ int PSPSaveDialog::Update(int animSpeed)
if (ReadStatus() == SCE_UTILITY_STATUS_FINISHED || pendingStatus == SCE_UTILITY_STATUS_FINISHED)
Memory::Memcpy(requestAddr, &request, request.common.size, "SaveDialogParam");
param.ClearCaches();
param.ClearSFOCache();
return 0;
}
void PSPSaveDialog::ExecuteIOAction() {
param.ClearCaches();
param.ClearSFOCache();
auto &result = param.GetPspParam()->common.result;
std::lock_guard<std::mutex> guard(paramLock);
switch (display) {
@ -1105,11 +1105,11 @@ void PSPSaveDialog::ExecuteIOAction() {
}
ioThreadStatus = SAVEIO_DONE;
param.ClearCaches();
param.ClearSFOCache();
}
void PSPSaveDialog::ExecuteNotVisibleIOAction() {
param.ClearCaches();
param.ClearSFOCache();
auto &result = param.GetPspParam()->common.result;
switch ((SceUtilitySavedataType)(u32)param.GetPspParam()->mode) {
@ -1191,7 +1191,7 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
break;
}
param.ClearCaches();
param.ClearSFOCache();
}
void PSPSaveDialog::JoinIOThread() {
@ -1231,7 +1231,7 @@ int PSPSaveDialog::Shutdown(bool force) {
ChangeStatusShutdown(SAVEDATA_SHUTDOWN_DELAY_US);
}
param.SetPspParam(0);
param.ClearCaches();
param.ClearSFOCache();
return 0;
}

View File

@ -345,7 +345,7 @@ bool SavedataParam::Delete(SceUtilitySavedataParam* param, int saveId) {
return false;
}
ClearCaches();
ClearSFOCache();
pspFileSystem.RmDir(dirPath);
return true;
}
@ -381,7 +381,7 @@ int SavedataParam::DeleteData(SceUtilitySavedataParam* param) {
return 0;
}
ClearCaches();
ClearSFOCache();
pspFileSystem.RemoveFile(filePath);
// Update PARAM.SFO to remove the file, if it was in the list.
@ -411,7 +411,7 @@ int SavedataParam::DeleteData(SceUtilitySavedataParam* param) {
size_t sfoSize;
sfoFile->WriteSFO(&sfoData, &sfoSize);
ClearCaches();
ClearSFOCache();
WritePSPFile(sfoPath, sfoData, (SceSize)sfoSize);
delete[] sfoData;
}
@ -558,7 +558,7 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
UpdateHash(sfoData, (int)sfoSize, offset, DetermineCryptMode(param));
}
ClearCaches();
ClearSFOCache();
WritePSPFile(sfopath, sfoData, (SceSize)sfoSize);
delete[] sfoData;
sfoData = nullptr;
@ -1942,7 +1942,7 @@ void SavedataParam::DoState(PointerWrap &p) {
}
}
void SavedataParam::ClearCaches() {
void SavedataParam::ClearSFOCache() {
std::lock_guard<std::mutex> guard(cacheLock_);
sfoCache_.clear();
}
@ -1951,7 +1951,7 @@ std::shared_ptr<ParamSFOData> SavedataParam::LoadCachedSFO(const std::string &pa
std::lock_guard<std::mutex> guard(cacheLock_);
if (sfoCache_.find(path) == sfoCache_.end()) {
std::vector<u8> data;
if (pspFileSystem.ReadEntireFile(path, data) < 0) {
if (pspFileSystem.ReadEntireFile(path, data, true) < 0) {
// Mark as not existing for later.
sfoCache_[path].reset();
} else {

View File

@ -357,7 +357,7 @@ public:
bool WouldHaveMultiSaveName(const SceUtilitySavedataParam *param);
void ClearCaches();
void ClearSFOCache();
void DoState(PointerWrap &p);