aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2017-02-13 11:06:47 -0600
committerColin Snover2017-04-22 19:28:34 -0500
commit8817e8e3bfc7de80b1c7fae72f692a79055025ab (patch)
tree5b3aa6e03319d749b39d07283b73584f6125788b /engines
parent41c633f0c54d48cd4bec07369553985ad0caee00 (diff)
downloadscummvm-rg350-8817e8e3bfc7de80b1c7fae72f692a79055025ab.tar.gz
scummvm-rg350-8817e8e3bfc7de80b1c7fae72f692a79055025ab.tar.bz2
scummvm-rg350-8817e8e3bfc7de80b1c7fae72f692a79055025ab.zip
SCI: Explicitly label slot 0 as the autosave slot in the ScummVM UI
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;