[Scummvm-git-logs] scummvm branch-2-2 -> 60391ad95a4fef725c5c349a3cfb1e759373239e

dreammaster paulfgilbert at gmail.com
Sun Sep 6 02:59:26 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
60391ad95a GLK: ZCODE: Turn off autosaves for ZCode games


Commit: 60391ad95a4fef725c5c349a3cfb1e759373239e
    https://github.com/scummvm/scummvm/commit/60391ad95a4fef725c5c349a3cfb1e759373239e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-09-05T19:59:17-07:00

Commit Message:
GLK: ZCODE: Turn off autosaves for ZCode games

ZMachine saves also includes the current execution
stack. So I'm honestly not sure how to create an
autosave in the background that has a valid stack
than can be properly restored. With an imminent
release, it's better to disable autosaves for now

Changed paths:
    engines/glk/zcode/zcode.cpp
    engines/glk/zcode/zcode.h


diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 9cc830e4de..9541c11b10 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -139,6 +139,7 @@ Common::Error ZCode::saveGameState(int slot, const Common::String &desc, bool is
 
 	Quetzal q(story_fp);
 	bool success = q.save(*file, this, desc);
+	file->close();
 
 	if (!success)
 		print_string("Error writing save file\n");
diff --git a/engines/glk/zcode/zcode.h b/engines/glk/zcode/zcode.h
index b3f48e7ac5..d18cac64a6 100644
--- a/engines/glk/zcode/zcode.h
+++ b/engines/glk/zcode/zcode.h
@@ -71,6 +71,17 @@ public:
 	 */
 	void runGame() override;
 
+	/**
+	 * Indicates whether an autosave can currently be saved.
+	 */
+	virtual bool canSaveAutosaveCurrently() {
+		/* ZCode saves also include the execution stack.
+		 * So I don't know how to do autosaves in the background
+		 * without ending up with an invalid stack state
+		 */
+		return false;
+	}
+
 	/**
 	 * Load a savegame from a given slot
 	 */




More information about the Scummvm-git-logs mailing list