diff options
author | Colin Snover | 2017-02-13 11:06:47 -0600 |
---|---|---|
committer | Colin Snover | 2017-04-22 19:28:34 -0500 |
commit | 8817e8e3bfc7de80b1c7fae72f692a79055025ab (patch) | |
tree | 5b3aa6e03319d749b39d07283b73584f6125788b | |
parent | 41c633f0c54d48cd4bec07369553985ad0caee00 (diff) | |
download | scummvm-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
-rw-r--r-- | engines/sci/detection.cpp | 8 |
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; |