[Scummvm-git-logs] scummvm master -> 5aaa67fac27dee1a700e13029bd54ad7591d72b2
bluegr
noreply at scummvm.org
Sat Dec 2 12:40:36 UTC 2023
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:
5aaa67fac2 TRECISION: Fix thumbnail when using ScummVM menu to save (bug #13834)
Commit: 5aaa67fac27dee1a700e13029bd54ad7591d72b2
https://github.com/scummvm/scummvm/commit/5aaa67fac27dee1a700e13029bd54ad7591d72b2
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-12-02T14:40:33+02:00
Commit Message:
TRECISION: Fix thumbnail when using ScummVM menu to save (bug #13834)
When saving from the game's control panel, we use the thumbnail that was
created before the control panel opened. But when using the ScummVM
menu, we need to generate the thumbnail as usual. Otherwise, there may
not be any thumbnail at all, causing the save to fail.
Changed paths:
engines/trecision/logic.cpp
engines/trecision/metaengine.cpp
engines/trecision/trecision.h
diff --git a/engines/trecision/logic.cpp b/engines/trecision/logic.cpp
index 062c11b208a..77c9e284552 100644
--- a/engines/trecision/logic.cpp
+++ b/engines/trecision/logic.cpp
@@ -3988,7 +3988,9 @@ void LogicManager::handleClickControlPanel(uint16 curObj) {
if (_vm->_oldRoom == kRoomControlPanel)
break;
_vm->_curRoom = _vm->_obj[o00EXIT]._goRoom;
+ _vm->_controlPanelSave = true;
_vm->dataSave();
+ _vm->_controlPanelSave = false;
_vm->showInventoryName(NO_OBJECTS, false);
_vm->showIconName();
_vm->changeRoom(_vm->_obj[o00EXIT]._goRoom);
diff --git a/engines/trecision/metaengine.cpp b/engines/trecision/metaengine.cpp
index dcf356e9765..87d51b5fa19 100644
--- a/engines/trecision/metaengine.cpp
+++ b/engines/trecision/metaengine.cpp
@@ -68,7 +68,13 @@ void TrecisionMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
// We are referencing g_engine here, but this should be safe, as this
// method is only used while the engine is running.
// TODO: Is there a better way to do this?
- thumb.copyFrom(((Trecision::TrecisionEngine *)g_engine)->_thumbnail);
+
+ Trecision::TrecisionEngine *engine = (Trecision::TrecisionEngine *)g_engine;
+
+ if (engine->_controlPanelSave)
+ thumb.copyFrom(engine->_thumbnail);
+ else
+ MetaEngine::getSavegameThumbnail(thumb);
}
SaveStateDescriptor TrecisionMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
diff --git a/engines/trecision/trecision.h b/engines/trecision/trecision.h
index 82cf0b1f929..139545cc086 100644
--- a/engines/trecision/trecision.h
+++ b/engines/trecision/trecision.h
@@ -243,6 +243,7 @@ public:
const ADGameDescription *_gameDescription;
Graphics::Surface _thumbnail;
+ bool _controlPanelSave = false;
uint16 _curRoom;
uint16 _oldRoom;
More information about the Scummvm-git-logs
mailing list