From cd00132d230ebf9bf51d3d111ca889fe382e2ddb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 23 Aug 2016 11:19:53 +0300 Subject: SCI32: Also handle game checks for "torinsg.cat" in Torin This shows the "Open..." button when continuing a game --- engines/sci/engine/kfile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index a3a97eb7ee..e5b0aaf47a 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -257,11 +257,14 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { // by opening it. Since we don't use .cat files, we instead check // for autosave.000 or autosave.001. // + // The same logic is being followed for torinsg.cat - this shows + // the "Open..." button when continuing a game. + // // This has the added benefit of not detecting an SSCI autosave.cat // accompanying SSCI autosave files that we wouldn't be able to load. - if (g_sci->getGameId() == GID_TORIN && name == "autosave.cat") { - Common::String pattern = g_sci->wrapFilename("autosave.###"); + if (g_sci->getGameId() == GID_TORIN && (name == "autosave.cat" || name == "torinsg.cat")) { Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + const Common::String pattern = (name == "autosave.cat") ? g_sci->wrapFilename("autosave.###") : g_sci->getSavegamePattern(); bool exists = !saveFileMan->listSavefiles(pattern).empty(); if (exists) { // Dummy handle. Torin only checks if this is SIGNAL_REG, -- cgit v1.2.3