diff options
-rw-r--r-- | engines/titanic/input_handler.h | 5 | ||||
-rw-r--r-- | engines/titanic/titanic.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/input_handler.h b/engines/titanic/input_handler.h index 5f0be04f1a..69434cda88 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 1494a6a6a2..8a1b00c0fc 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(); |