aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/detection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 6799c3521f..422bbba310 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -756,6 +756,7 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
filenames = saveFileMan->listSavefiles(pattern);
SaveStateList saveList;
+ bool hasAutosave = false;
int slotNr = 0;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
@@ -775,6 +776,7 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
if (slotNr == 0) {
// ScummVM auto-save slot
descriptor.setWriteProtectedFlag(true);
+ hasAutosave = true;
} else {
descriptor.setWriteProtectedFlag(false);
}
@@ -785,6 +787,12 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
}
}
+ if (!hasAutosave) {
+ SaveStateDescriptor descriptor(0, _("(Autosave)"));
+ descriptor.setLocked(true);
+ saveList.push_back(descriptor);
+ }
+
// Sort saves based on slot number.
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;