aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-18 00:09:49 +0200
committerWillem Jan Palenstijn2015-12-23 21:34:07 +0100
commit361aab82dc22e391b333daa0cf7ffc56850f9450 (patch)
tree7810c5fca8414a946ad64173b126a2faa088246c /engines/lab
parent540173de3693eb78b07fed6a1bac8db1f3049829 (diff)
downloadscummvm-rg350-361aab82dc22e391b333daa0cf7ffc56850f9450.tar.gz
scummvm-rg350-361aab82dc22e391b333daa0cf7ffc56850f9450.tar.bz2
scummvm-rg350-361aab82dc22e391b333daa0cf7ffc56850f9450.zip
LAB: Fix regression in left click handling
A regression of 326d9b5872177a1fea3fe24048286bd7c66242d8
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/eventman.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp
index c67250d1ad..f346fd5dab 100644
--- a/engines/lab/eventman.cpp
+++ b/engines/lab/eventman.cpp
@@ -226,12 +226,16 @@ bool EventManager::haveNextChar() {
void EventManager::processInput() {
Common::Event event;
+ Button *curButton = nullptr;
while (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
if (_screenButtonList)
- _lastButtonHit = checkButtonHit(_screenButtonList, _vm->_isHiRes ? _mousePos : Common::Point(_mousePos.x / 2, _mousePos.y));
+ curButton = checkButtonHit(_screenButtonList, _vm->_isHiRes ? _mousePos : Common::Point(_mousePos.x / 2, _mousePos.y));
+
+ if (curButton)
+ _lastButtonHit = curButton;
else
_leftClick = true;
break;