From 4f71d3814c76c1adb80ac46b6c89a405a98ddd1a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 6 Apr 2008 13:06:05 +0000 Subject: Fixed various bugs in GUI_v2::processButtonList. This fixes bugs: - #1935827 "HoF: Buttons pressed state not available" - #1935219 "HoF: artefact after loading game" svn-id: r31422 --- engines/kyra/kyra_v2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/kyra/kyra_v2.cpp') diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 5e4ac8909f..176cc1bb6f 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -771,10 +771,11 @@ void KyraEngine_v2::updateInput() { _eventList.push_back(event); break; - case Common::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONDOWN: _eventList.push_back(Event(event, true)); break; + case Common::EVENT_LBUTTONUP: case Common::EVENT_MOUSEMOVE: _eventList.push_back(event); break; @@ -822,11 +823,12 @@ int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) { _screen->updateScreen(); } break; + case Common::EVENT_LBUTTONDOWN: case Common::EVENT_LBUTTONUP: { Common::Point pos = getMousePos(); _mouseX = pos.x; _mouseY = pos.y; - keys = 199; + keys = event.type == Common::EVENT_LBUTTONDOWN ? 199 : (200 | 0x800); breakLoop = true; } break; -- cgit v1.2.3