AGI/COMMON: Fixed bug #3407308 - "AGI: SQ2: Saving allowed in autosave slot 0 from scummvmmenu"

The save/load dialog code was not polling for meta info for empty slots
This commit is contained in:
Filippos Karapetis 2011-09-25 15:01:23 +03:00
parent d50b519653
commit d01d228ee8
2 changed files with 5 additions and 3 deletions

View File

@ -306,9 +306,11 @@ SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int sl
delete in; delete in;
return desc; return desc;
} else {
SaveStateDescriptor emptySave(slot, "");
emptySave.setWriteProtectedFlag(slot == 0);
return emptySave;
} }
return SaveStateDescriptor();
} }
const ADGameDescription *AgiMetaEngine::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const { const ADGameDescription *AgiMetaEngine::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const {

View File

@ -240,7 +240,7 @@ void SaveLoadChooser::updateSelection(bool redraw) {
_time->setLabel(_("No time saved")); _time->setLabel(_("No time saved"));
_playtime->setLabel(_("No playtime saved")); _playtime->setLabel(_("No playtime saved"));
if (selItem >= 0 && !_list->getSelectedString().empty() && _metaInfoSupport) { if (selItem >= 0 && _metaInfoSupport) {
SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()); SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot());
isDeletable = desc.getDeletableFlag() && _delSupport; isDeletable = desc.getDeletableFlag() && _delSupport;