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.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/mads/detection.cpp b/engines/mads/detection.cpp
index 49253f0e3a..971acde024 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/events.h"
#include "mads/game.h"
#define MAX_SAVES 99
@@ -168,10 +169,16 @@ SaveStateDescriptor MADSMetaEngine::querySaveMetaInfos(const char *target, int s
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
if (f) {
+ MADS::MADSSavegameHeader header;
+ MADS::Game::readSavegameHeader(f, header);
delete f;
// Create the return descriptor
- SaveStateDescriptor desc(slot, "");
+ SaveStateDescriptor desc(slot, header._saveName);
+ desc.setThumbnail(header._thumbnail);
+ desc.setSaveDate(header._year, header._month, header._day);
+ desc.setSaveTime(header._hour, header._minute);
+ desc.setPlayTime(header._totalFrames * GAME_FRAME_TIME);
return desc;
}