mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 10:09:32 +01:00
SaveState: Show a warning if saved after savestate.
If you load a save state from before you created savedata (or from a different path of savedata), some games will refuse to save. This shows a warning since it can be a confusing situation. We could potentially add an undo for loading state, to give an option for getting back after this warning.
This commit is contained in:
1 parent
86c5a17d1e
commit
eba67d5fcd
3 files changed
+62
-19
No files matched your search
@@ -25,23 +25,23 @@
|
||||
#include <ctime>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Core/Dialog/PSPSaveDialog.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/Util/PPGeDraw.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Core/HLE/sceUtility.h"
|
||||
#include "Core/HW/MemoryStick.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/HW/MemoryStick.h"
|
||||
#include "Core/Dialog/PSPSaveDialog.h"
|
||||
#include "Core/SaveState.h"
|
||||
|
||||
const static float FONT_SCALE = 0.55f;
|
||||
|
||||
@@ -1048,6 +1048,7 @@ void PSPSaveDialog::ExecuteIOAction() {
|
||||
}
|
||||
break;
|
||||
case DS_SAVE_SAVING:
|
||||
SaveState::NotifySaveData();
|
||||
if (param.Save(param.GetPspParam(), GetSelectedSaveDirName()) == 0) {
|
||||
display = DS_SAVE_DONE;
|
||||
} else {
|
||||
@@ -1085,6 +1086,7 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
|
||||
break;
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_SAVE: // Only save and exit
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_AUTOSAVE:
|
||||
SaveState::NotifySaveData();
|
||||
result = param.Save(param.GetPspParam(), GetSelectedSaveDirName());
|
||||
break;
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_SIZES:
|
||||
@@ -1129,6 +1131,7 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
|
||||
// TODO: Should reset the directory's other files.
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_MAKEDATA:
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_MAKEDATASECURE:
|
||||
SaveState::NotifySaveData();
|
||||
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;
|
||||
@@ -1136,6 +1139,7 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
|
||||
break;
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_WRITEDATA:
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE:
|
||||
SaveState::NotifySaveData();
|
||||
result = param.Save(param.GetPspParam(), GetSelectedSaveDirName(), param.GetPspParam()->mode == SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE);
|
||||
break;
|
||||
case SCE_UTILITY_SAVEDATA_TYPE_READDATA:
|
||||
|
||||
Reference in new issue
Block a user