aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorJohannes Schickel2016-03-08 19:07:48 +0100
committerJohannes Schickel2016-03-08 19:07:48 +0100
commit7fde01b65815c9e4ed70958f3d2d97af7df4589b (patch)
treebdc51f89035ad0fedfadc3a68b6a383db01ff6c5 /engines/lab
parente515fc18db0cdff1d947ef8686123ef0dc669cff (diff)
downloadscummvm-rg350-7fde01b65815c9e4ed70958f3d2d97af7df4589b.tar.gz
scummvm-rg350-7fde01b65815c9e4ed70958f3d2d97af7df4589b.tar.bz2
scummvm-rg350-7fde01b65815c9e4ed70958f3d2d97af7df4589b.zip
LAB: Remove gap handling from removeSaveState.
This removes the annoying behavior that removing a save state causes your physical files to be renamed.
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/detection.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp
index 9fe4a16d35..1fd3ca8944 100644
--- a/engines/lab/detection.cpp
+++ b/engines/lab/detection.cpp
@@ -197,26 +197,7 @@ int LabMetaEngine::getMaximumSaveSlot() const {
void LabMetaEngine::removeSaveState(const char *target, int slot) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::String filename = Common::String::format("%s.%03u", target, slot);
-
- saveFileMan->removeSavefile(filename.c_str());
-
- Common::StringArray filenames;
- Common::String pattern = target;
- pattern += ".###";
- filenames = saveFileMan->listSavefiles(pattern.c_str());
- Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
-
- for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
- // Obtain the last 3 digits of the filename, since they correspond to the save slot
- int slotNum = atoi(file->c_str() + file->size() - 3);
-
- // Rename every slot greater than the deleted slot,
- if (slotNum > slot) {
- saveFileMan->renameSavefile(file->c_str(), filename.c_str());
- filename = Common::String::format("%s.%03u", target, ++slot);
- }
- }
+ saveFileMan->removeSavefile(Common::String::format("%s.%03u", target, slot));
}
SaveStateDescriptor LabMetaEngine::querySaveMetaInfos(const char *target, int slot) const {