From bda3fc940c3ecca011b04a32fb20970f53f49d1c Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 10 Jan 2010 13:22:45 +0000 Subject: SCI: kPortrait - abort on mouse presses only svn-id: r47225 --- engines/sci/graphics/portrait.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp index fc48ba981c..354c583012 100644 --- a/engines/sci/graphics/portrait.cpp +++ b/engines/sci/graphics/portrait.cpp @@ -172,8 +172,10 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint do { _gui->wait(1); curEvent = _event->get(SCI_EVENT_ANY); + if (curEvent.type == SCI_EVENT_MOUSE_PRESS) + userAbort = true; curPosition = _audio->getAudioPosition(); - } while ((curPosition != -1) && (curPosition < timerPosition) && (curEvent.type == SCI_EVENT_NONE)); + } while ((curPosition != -1) && (curPosition < timerPosition) && (!userAbort)); if (syncCue != 0xFFFF) { // Display animation bitmap @@ -186,12 +188,6 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint warning("kPortrait: sync information tried to draw non-existant %d", syncCue); } } - - switch (curEvent.type) { - case SCI_EVENT_MOUSE_RELEASE: - case SCI_EVENT_MOUSE_PRESS: - userAbort = true; - } } if (userAbort) -- cgit v1.2.3