From eab6682929d47d09c0ac81921f479e46a06e93bd Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 16 Dec 2015 00:07:31 +0100 Subject: LAB: Add some checks to quit the game quickly when closing ScummVM --- engines/lab/special.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'engines/lab/special.cpp') diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 38921ea650..02bbdf4c07 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -260,10 +260,14 @@ void LabEngine::processJournal() { // Make sure we check the music at least after every message _music->updateMusic(); IntuiMessage *msg = _event->getMsg(); + if (g_engine->shouldQuit()) { + _quitLab = true; + return; + } - if (msg == NULL) { + if (!msg) _music->updateMusic(); - } else { + else { uint32 msgClass = msg->_msgClass; uint16 qualifier = msg->_qualifier; uint16 gadID = msg->_code; @@ -420,8 +424,12 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera // Make sure we check the music at least after every message _music->updateMusic(); IntuiMessage *msg = _event->getMsg(); + if (g_engine->shouldQuit()) { + _quitLab = true; + return; + } - if (msg == NULL) { + if (!msg) { _music->updateMusic(); } else { uint32 msgClass = msg->_msgClass; -- cgit v1.2.3