[Scummvm-git-logs] scummvm master -> afe27c6de8ea2419e38fcc2e847bbc28d629c553

dreammaster dreammaster at scummvm.org
Wed Jul 5 14:22:18 CEST 2017


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:
afe27c6de8 TITANIC: Don't allow GMM save/loading during cutscenes


Commit: afe27c6de8ea2419e38fcc2e847bbc28d629c553
    https://github.com/scummvm/scummvm/commit/afe27c6de8ea2419e38fcc2e847bbc28d629c553
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-07-05T08:22:05-04:00

Commit Message:
TITANIC: Don't allow GMM save/loading during cutscenes

Changed paths:
    engines/titanic/input_handler.h
    engines/titanic/titanic.cpp


diff --git a/engines/titanic/input_handler.h b/engines/titanic/input_handler.h
index 5f0be04..69434cd 100644
--- a/engines/titanic/input_handler.h
+++ b/engines/titanic/input_handler.h
@@ -77,6 +77,11 @@ public:
 	 * Handles a genereated mouse message
 	 */
 	void handleMessage(CMessage &msg, bool respectLock = true);
+
+	/**
+	 * Returns true if input is locked
+	 */
+	bool isLocked() const { return _lockCount > 0; }
 };
 
 } // End of namespace Titanic
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 1494a6a..8a1b00c 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -177,8 +177,13 @@ void TitanicEngine::setRoomNames() {
 
 bool TitanicEngine::canLoadGameStateCurrently() {
 	CGameManager *gameManager = _window->_gameManager;
+	CScreenManager *screenMan = CScreenManager::_screenManagerPtr;
+
 	if (!_window->_inputAllowed || !gameManager->_gameState._petActive)
 		return false;
+	if (screenMan && screenMan->_inputHandler->isLocked())
+		return false;
+
 	CProjectItem *project = gameManager->_project;
 	if (project) {
 		CPetControl *pet = project->getPetControl();





More information about the Scummvm-git-logs mailing list