Skip to content

Commit fb92ae5

Browse files
committed
Merge pull request #20500 from hrydgard/save-detection-fixes
Correct save/load detection for the reminder.
1 parent 74ac13d commit fb92ae5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Core/Dialog/PSPSaveDialog.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
static double g_lastSaveTime = -1.0;
4343

44+
// Actually this should be called on both saves and loads, since just after a load it's safe to exit.
4445
void ResetSecondsSinceLastGameSave() {
4546
g_lastSaveTime = time_now_d();
4647
}
@@ -204,8 +205,7 @@ int PSPSaveDialog::Init(int paramAddr) {
204205
break;
205206
case SCE_UTILITY_SAVEDATA_TYPE_SAVE:
206207
DEBUG_LOG(Log::sceUtility, "Saving. Title: %s Save: %s File: %s", param.GetGameName(param.GetPspParam()).c_str(), param.GetGameName(param.GetPspParam()).c_str(), param.GetFileName(param.GetPspParam()).c_str());
207-
if (param.GetFileInfo(0).size != 0)
208-
{
208+
if (param.GetFileInfo(0).size != 0) {
209209
yesnoChoice = 0;
210210
display = DS_SAVE_CONFIRM_OVERWRITE;
211211
}
@@ -1108,6 +1108,7 @@ void PSPSaveDialog::ExecuteIOAction() {
11081108
} else {
11091109
display = DS_LOAD_FAILED;
11101110
}
1111+
ResetSecondsSinceLastGameSave();
11111112
break;
11121113
case DS_SAVE_SAVING:
11131114
SaveState::NotifySaveData();
@@ -1117,6 +1118,7 @@ void PSPSaveDialog::ExecuteIOAction() {
11171118
} else {
11181119
display = DS_SAVE_FAILED;
11191120
}
1121+
ResetSecondsSinceLastGameSave();
11201122
break;
11211123
case DS_DELETE_DELETING:
11221124
if (param.Delete(param.GetPspParam(), currentSelectedSave)) {

0 commit comments

Comments
 (0)