CINE: Use slot test to test where save is stored

As an interim measure, also reinstate the setAutosave(true) call in querySaveMetaInfos() for the dummy autosave, though I suspect the call to create the dummy autosave should only appear in listSaves(), since there's no save file attached for autosave testing, so no possible data loss (potential fix [#13432](https://bugs.scummvm.org/ticket/13432)).
This commit is contained in:
macca8 2022-11-04 18:10:25 +11:00 committed by Eugene Sandulenko
parent 2868b74e30
commit 201bed6634

View File

@ -154,14 +154,14 @@ SaveStateList CineMetaEngine::listSaves(const char *target) const {
SaveStateDescriptor saveStateDesc(this, slotNum, saveDesc);
if (saveStateDesc.getDescription().empty()) {
if (saveStateDesc.isAutosave()) {
if (slotNum == getAutosaveSlot()) {
saveStateDesc.setDescription(_("Unnamed autosave"));
} else {
saveStateDesc.setDescription(_("Unnamed savegame"));
}
}
if (saveStateDesc.isAutosave()) {
if (slotNum == getAutosaveSlot()) {
foundAutosave = true;
}
@ -237,7 +237,9 @@ SaveStateDescriptor CineMetaEngine::querySaveMetaInfos(const char *target, int s
// No saving on empty autosave slot
if (slot == getAutosaveSlot()) {
return SaveStateDescriptor(this, slot, _("Empty autosave"));
SaveStateDescriptor desc(this, slot, _("Empty autosave"));
desc.setAutosave(true);
return desc;
}
return SaveStateDescriptor();