mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Show a message when saving/loading fails.
This commit is contained in:
parent
553c870ee9
commit
e3c6876365
2 changed files with 71 additions and 11 deletions
|
@ -691,6 +691,30 @@ int PSPSaveDialog::Update(int animSpeed)
|
|||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_SAVE_FAILED:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("SavingFailed", "Unable to save data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_SAVE);
|
||||
|
||||
if (IsButtonPressed(cancelButtonFlag)) {
|
||||
// Go back to the list so they can try again.
|
||||
if (param.GetPspParam()->mode != SCE_UTILITY_SAVEDATA_TYPE_SAVE) {
|
||||
display = DS_SAVE_LIST_CHOICE;
|
||||
} else {
|
||||
param.GetPspParam()->common.result = SCE_UTILITY_DIALOG_RESULT_CANCEL;
|
||||
StartFade(false);
|
||||
}
|
||||
}
|
||||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_SAVE_DONE:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
@ -769,6 +793,30 @@ int PSPSaveDialog::Update(int animSpeed)
|
|||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_LOAD_FAILED:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
||||
DisplaySaveIcon();
|
||||
DisplaySaveDataInfo2();
|
||||
|
||||
DisplayMessage(d->T("LoadingFailed", "Unable to load data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_LOAD);
|
||||
|
||||
if (IsButtonPressed(cancelButtonFlag)) {
|
||||
// Go back to the list so they can try again.
|
||||
if (param.GetPspParam()->mode != SCE_UTILITY_SAVEDATA_TYPE_LOAD) {
|
||||
display = DS_LOAD_LIST_CHOICE;
|
||||
} else {
|
||||
param.GetPspParam()->common.result = SCE_UTILITY_DIALOG_RESULT_CANCEL;
|
||||
StartFade(false);
|
||||
}
|
||||
}
|
||||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_LOAD_DONE:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
@ -867,6 +915,21 @@ int PSPSaveDialog::Update(int animSpeed)
|
|||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_DELETE_FAILED:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
||||
DisplayMessage(d->T("DeleteFailed", "Unable to delete data."));
|
||||
|
||||
DisplayButtons(DS_BUTTON_CANCEL);
|
||||
DisplayBanner(DB_DELETE);
|
||||
|
||||
if (IsButtonPressed(cancelButtonFlag)) {
|
||||
display = DS_DELETE_LIST_CHOICE;
|
||||
}
|
||||
|
||||
EndDraw();
|
||||
break;
|
||||
case DS_DELETE_DONE:
|
||||
JoinIOThread();
|
||||
StartDraw();
|
||||
|
@ -932,9 +995,7 @@ void PSPSaveDialog::ExecuteIOAction() {
|
|||
if (param.Load(param.GetPspParam(), GetSelectedSaveDirName(), currentSelectedSave)) {
|
||||
display = DS_LOAD_DONE;
|
||||
} else {
|
||||
// TODO: This should probably show an error message?
|
||||
param.GetPspParam()->common.result = SCE_UTILITY_DIALOG_RESULT_CANCEL;
|
||||
StartFade(false);
|
||||
display = DS_LOAD_FAILED;
|
||||
}
|
||||
break;
|
||||
case DS_SAVE_SAVING:
|
||||
|
@ -942,12 +1003,7 @@ void PSPSaveDialog::ExecuteIOAction() {
|
|||
param.SetPspParam(param.GetPspParam()); // Optim : Just Update modified save
|
||||
display = DS_SAVE_DONE;
|
||||
} else {
|
||||
// TODO: This should probably show an error message?
|
||||
if (param.GetPspParam()->mode != SCE_UTILITY_SAVEDATA_TYPE_SAVE) {
|
||||
display = DS_SAVE_LIST_CHOICE;
|
||||
} else {
|
||||
StartFade(false);
|
||||
}
|
||||
display = DS_SAVE_FAILED;
|
||||
}
|
||||
break;
|
||||
case DS_DELETE_DELETING:
|
||||
|
@ -955,7 +1011,7 @@ void PSPSaveDialog::ExecuteIOAction() {
|
|||
param.SetPspParam(param.GetPspParam()); // Optim : Just Update modified save
|
||||
display = DS_DELETE_DONE;
|
||||
} else {
|
||||
display = DS_DELETE_LIST_CHOICE; // This will probably need error message ?
|
||||
display = DS_DELETE_FAILED;
|
||||
}
|
||||
break;
|
||||
case DS_NONE:
|
||||
|
|
|
@ -116,7 +116,11 @@ private:
|
|||
DS_DELETE_CONFIRM,
|
||||
DS_DELETE_DELETING,
|
||||
DS_DELETE_DONE,
|
||||
DS_DELETE_NODATA
|
||||
DS_DELETE_NODATA,
|
||||
|
||||
DS_SAVE_FAILED,
|
||||
DS_LOAD_FAILED,
|
||||
DS_DELETE_FAILED,
|
||||
};
|
||||
|
||||
enum DialogBanner
|
||||
|
|
Loading…
Add table
Reference in a new issue