aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/detection.cpp')
-rw-r--r--engines/mads/detection.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/mads/detection.cpp b/engines/mads/detection.cpp
index 015859f827..b8e75b4393 100644
--- a/engines/mads/detection.cpp
+++ b/engines/mads/detection.cpp
@@ -31,6 +31,7 @@
#include "common/system.h"
#include "graphics/colormasks.h"
#include "graphics/surface.h"
+#include "mads/game.h"
#define MAX_SAVES 99
@@ -124,6 +125,7 @@ SaveStateList MADSMetaEngine::listSaves(const char *target) const {
Common::StringArray filenames;
Common::String saveDesc;
Common::String pattern = Common::String::format("%s.0??", target);
+ MADS::MADSSavegameHeader header;
filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order
@@ -137,6 +139,11 @@ SaveStateList MADSMetaEngine::listSaves(const char *target) const {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
if (in) {
+ MADS::Game::readSavegameHeader(in, header);
+ saveList.push_back(SaveStateDescriptor(slot, header._saveName));
+
+ header._thumbnail->free();
+ delete header._thumbnail;
delete in;
}
}