diff options
Diffstat (limited to 'engines/scumm/detection.cpp')
-rw-r--r-- | engines/scumm/detection.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 2a6e0c0b10..1062e77114 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -682,6 +682,7 @@ public: virtual PluginError createInstance(OSystem *syst, Engine **engine) const; virtual SaveStateList listSaves(const char *target) const; + virtual void removeSaveState(const char *target, int slot) const; }; bool ScummMetaEngine::hasFeature(MetaEngineFeature f) const { @@ -975,6 +976,16 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const { return saveList; } +void ScummMetaEngine::removeSaveState(const char *target, int slot) const { + char extension[6]; + snprintf(extension, sizeof(extension), ".s%02d", slot); + + Common::String filename = target; + filename += extension; + + g_system->getSavefileManager()->removeSavefile(filename.c_str()); +} + #if PLUGIN_ENABLED_DYNAMIC(SCUMM) REGISTER_PLUGIN_DYNAMIC(SCUMM, PLUGIN_TYPE_ENGINE, ScummMetaEngine); #else |