[Scummvm-git-logs] scummvm master -> 56d2eb3fb873627ca3cc537ee6923298670d5293

bluegr noreply at scummvm.org
Thu Sep 5 12:37:28 UTC 2024


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:
56d2eb3fb8 MYST3: Generate a new thumbnail when autosaving


Commit: 56d2eb3fb873627ca3cc537ee6923298670d5293
    https://github.com/scummvm/scummvm/commit/56d2eb3fb873627ca3cc537ee6923298670d5293
Author: macca8 (brubask6 at yahoo.com)
Date: 2024-09-05T15:37:25+03:00

Commit Message:
MYST3: Generate a new thumbnail when autosaving

Changed paths:
    engines/myst3/myst3.cpp


diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp
index 533c6b68852..061048b0393 100644
--- a/engines/myst3/myst3.cpp
+++ b/engines/myst3/myst3.cpp
@@ -1577,12 +1577,12 @@ Common::Error Myst3Engine::saveGameState(int slot, const Common::String &desc, b
 		return Common::Error(Common::kCreatingFileFailed, _("Invalid file name for saving"));
 	}
 
-	// Try to use an already generated thumbnail
-	const Graphics::Surface *thumbnail = _menu->borrowSaveThumbnail();
-	if (!thumbnail) {
+	// If autosaving, get a fresh thumbnail of the game screen
+	if (isAutosave && !_menu->isOpen()) {
 		_menu->generateSaveThumbnail();
 	}
-	thumbnail = _menu->borrowSaveThumbnail();
+	// Use the currently generated thumbnail
+	const Graphics::Surface *thumbnail = _menu->borrowSaveThumbnail();
 	assert(thumbnail);
 
 	return saveGameState(desc, thumbnail, isAutosave);




More information about the Scummvm-git-logs mailing list