aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/macventure/detection.cpp8
-rw-r--r--engines/macventure/saveload.cpp5
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/macventure/detection.cpp b/engines/macventure/detection.cpp
index 082a8acc65..f4edaefa40 100644
--- a/engines/macventure/detection.cpp
+++ b/engines/macventure/detection.cpp
@@ -65,12 +65,14 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual SaveStateList listSaves(const char *target) const;
virtual int getMaximumSaveSlot() const;
+ virtual void removeSaveState(const char *target, int slot) const;
};
bool MacVentureMetaEngine::hasFeature(MetaEngineFeature f) const {
return
(f == kSupportsListSaves) ||
- (f == kSupportsLoadingDuringStartup);
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave);
}
bool MacVentureEngine::hasFeature(EngineFeature f) const {
@@ -127,6 +129,10 @@ bool MacVentureMetaEngine::createInstance(OSystem * syst, Engine ** engine, cons
return game != 0;
}
+void MacVentureMetaEngine::removeSaveState(const char *target, int slot) const {
+ g_system->getSavefileManager()->removeSavefile(Common::String::format("%s.%03d", target, slot));
+}
+
} // End of namespace MacVenture
#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
diff --git a/engines/macventure/saveload.cpp b/engines/macventure/saveload.cpp
index e1b6227851..1322a43510 100644
--- a/engines/macventure/saveload.cpp
+++ b/engines/macventure/saveload.cpp
@@ -89,6 +89,11 @@ Common::Error MacVentureEngine::saveGameState(int slot, const Common::String &de
Common::OutSaveFile *file = manager->openForSaving(saveFileName);
_world->saveGameInto(file);
writeMetaData(file, desc);
+
+ file->finalize();
+ if (file->err()) {
+ warning("Could not save '%s' correctly.", saveFileName.c_str());
+ }
delete file;
}