aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDavid Fioramonti2018-05-21 18:24:47 -0700
committerDavid Fioramonti2018-05-22 19:47:00 -0700
commit6041e4aca1466098cd903ed7a2eac4f2282d86a5 (patch)
tree7a8b8e7deb3eba29db316912dfc1f582db08c15c /engines
parent0500096703dba668e56b5ebb37c7ba5a58c32f0d (diff)
downloadscummvm-rg350-6041e4aca1466098cd903ed7a2eac4f2282d86a5.tar.gz
scummvm-rg350-6041e4aca1466098cd903ed7a2eac4f2282d86a5.tar.bz2
scummvm-rg350-6041e4aca1466098cd903ed7a2eac4f2282d86a5.zip
MOHAWK: Allow non-autosaves in autosave slot to be deletable
With the addition of autosaving support, deleting saves (via the gui) to slot 0 was disabled, but for saves that have been previousl created by the user it make sense that they should be allowed to delete a save in slot 0. Fixes Trac#10536.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/myst_state.cpp3
-rw-r--r--engines/mohawk/riven_saveload.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index a1077a71f1..c65ece55d5 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -309,7 +309,8 @@ SaveStateDescriptor MystGameState::querySaveMetaInfos(int slot) {
desc.setSaveDate(metadata.saveYear, metadata.saveMonth, metadata.saveDay);
desc.setSaveTime(metadata.saveHour, metadata.saveMinute);
desc.setPlayTime(metadata.totalPlayTime);
- desc.setDeletableFlag(slot != kAutoSaveSlot);
+ if (metadata.autoSave) // Allow non-saves to be deleted, but not autosaves
+ desc.setDeletableFlag(slot != kAutoSaveSlot);
Graphics::Surface *thumbnail;
if (!Graphics::loadThumbnail(*metadataFile, thumbnail)) {
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index 5ba0e51f8c..e8d29a0c24 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -142,7 +142,8 @@ SaveStateDescriptor RivenSaveLoad::querySaveMetaInfos(const int slot) {
descriptor.setPlayTime(metadata.totalPlayTime);
descriptor.setSaveDate(metadata.saveYear, metadata.saveMonth, metadata.saveDay);
descriptor.setSaveTime(metadata.saveHour, metadata.saveMinute);
- descriptor.setDeletableFlag(slot != kAutoSaveSlot);
+ if (metadata.autoSave) // Allow non-saves to be deleted, but not autosaves
+ descriptor.setDeletableFlag(slot != kAutoSaveSlot);
delete metaStream;