aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/detection.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-11 19:47:45 +0000
committerJohannes Schickel2008-09-11 19:47:45 +0000
commit0a35842954b9f1e79a84316deb496a4f4ecacf55 (patch)
tree43c3ef778cf7b0c0cde00714308afd85a65478df /engines/scumm/detection.cpp
parent6fd2cb99db561bf90e785eadf45bf41ace7bf5d8 (diff)
downloadscummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.gz
scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.bz2
scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.zip
Committed my patch #2105593 "Launcher/MetaEngine: Finnished removeSaveState".
svn-id: r34495
Diffstat (limited to 'engines/scumm/detection.cpp')
-rw-r--r--engines/scumm/detection.cpp11
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