Permalink
Browse files

Savedata: Return error codes on WRITEDATA/MAKEDATA.

  • Loading branch information...
unknownbrackets committed Aug 11, 2018
1 parent c32ffa1 commit 718053e7fce9370f927c2def2fd27207a5c450e2
Showing with 3 additions and 10 deletions.
  1. +3 −10 Core/Dialog/PSPSaveDialog.cpp
@@ -1101,21 +1101,14 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
// TODO: Should reset the directory's other files.
case SCE_UTILITY_SAVEDATA_TYPE_MAKEDATA:
case SCE_UTILITY_SAVEDATA_TYPE_MAKEDATASECURE:
if (param.Save(param.GetPspParam(), GetSelectedSaveDirName(), param.GetPspParam()->mode == SCE_UTILITY_SAVEDATA_TYPE_MAKEDATASECURE) == 0) {
result = 0;
} else if (MemoryStick_FreeSpace() == 0) {
result = param.Save(param.GetPspParam(), GetSelectedSaveDirName(), param.GetPspParam()->mode == SCE_UTILITY_SAVEDATA_TYPE_MAKEDATASECURE);
if (result == SCE_UTILITY_SAVEDATA_ERROR_SAVE_MS_NOSPACE) {
result = SCE_UTILITY_SAVEDATA_ERROR_RW_MEMSTICK_FULL;
} else {
result = SCE_UTILITY_SAVEDATA_ERROR_RW_NO_DATA;
}
break;
case SCE_UTILITY_SAVEDATA_TYPE_WRITEDATA:
case SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE:
if (param.Save(param.GetPspParam(), GetSelectedSaveDirName(), param.GetPspParam()->mode == SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE) == 0) {
result = 0;
} else {
result = SCE_UTILITY_SAVEDATA_ERROR_RW_NO_DATA;
}
result = param.Save(param.GetPspParam(), GetSelectedSaveDirName(), param.GetPspParam()->mode == SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE);
break;
case SCE_UTILITY_SAVEDATA_TYPE_READDATA:
case SCE_UTILITY_SAVEDATA_TYPE_READDATASECURE:

0 comments on commit 718053e

Please sign in to comment.