[Scummvm-git-logs] scummvm master -> 8d77870287e112abaa8a5d5839fc71b94ef17120
Die4Ever
noreply at scummvm.org
Tue Feb 15 22:58:33 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8d77870287 ENGINES: revert accidental changes to metaengine.cpp
Commit: 8d77870287e112abaa8a5d5839fc71b94ef17120
https://github.com/scummvm/scummvm/commit/8d77870287e112abaa8a5d5839fc71b94ef17120
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-02-15T16:58:23-06:00
Commit Message:
ENGINES: revert accidental changes to metaengine.cpp
Changed paths:
engines/metaengine.cpp
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 204e9fcc305..40c74f49351 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -355,37 +355,20 @@ SaveStateList MetaEngine::listSaves(const char *target) const {
SaveStateList MetaEngine::listSaves(const char *target, bool saveMode) const {
SaveStateList saveList = listSaves(target);
int autosaveSlot = ConfMan.getInt("autosave_period") ? getAutosaveSlot() : -1;
- bool addAutosave = saveMode;
- bool addReserved = saveMode;
- if (autosaveSlot == -1)
- addAutosave = false;
+ if (!saveMode || autosaveSlot == -1)
+ return saveList;
// Check to see if an autosave is present
for (SaveStateList::iterator it = saveList.begin(); it != saveList.end(); ++it) {
// It has an autosave
if (it->isAutosave())
- addAutosave = false;
- if (it->getSaveSlot() == 0) {
- addReserved = false;
- if (it->getDescription() != "OPEN HOUSE" && it->getDescription() != "Open House") {
- it->setDescription(_("Reserved"));
- }
- it->setLocked(saveMode);
- }
+ return saveList;
}
// No autosave yet. We want to add a dummy one in so that it can be marked as
// write protected, and thus be prevented from being saved in
- if (addAutosave) {
- SaveStateDescriptor desc(this, autosaveSlot, _("Autosave"));
- desc.setLocked(saveMode);
- saveList.push_back(desc);
- }
- if (addReserved) {
- SaveStateDescriptor desc(this, 0, _("Reserved"));
- desc.setLocked(saveMode);
- saveList.push_back(desc);
- }
+ SaveStateDescriptor desc(this, autosaveSlot, _("Autosave"));
+ saveList.push_back(desc);
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
More information about the Scummvm-git-logs
mailing list