From a53fa36913d3effba490d1d179c27833684b2635 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 4 Jan 2009 15:09:28 +0000 Subject: Made sure each event is processed only once. This wasn't always the case when _inputMode changed as a result of a game action. This also caused the comment mode to be apparently skipped. svn-id: r35725 --- engines/parallaction/input.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/parallaction/input.cpp') diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index 4904e63df6..3bedebb7f3 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -212,6 +212,8 @@ int Input::updateGameInput() { int Input::updateInput() { + int oldMode = _inputMode; + int event = kEvNone; readInput(); @@ -225,6 +227,13 @@ int Input::updateInput() { break; } + // when mode changes, then consider any input consumed + // for the current frame + if (oldMode != _inputMode) { + _mouseButtons = kEvNone; + _hasKeyPressEvent = false; + } + return event; } -- cgit v1.2.3