aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/toon.cpp
diff options
context:
space:
mode:
authorSylvain Dupont2010-10-16 15:44:50 +0000
committerSylvain Dupont2010-10-16 15:44:50 +0000
commitfff20668728536cf5077714b214ad69d79be5cc3 (patch)
tree431f931e77ecbefefa15ee720bd7ea656fc678a2 /engines/toon/toon.cpp
parent7b50c2e3c3affcb242d096f30e59f3856b267b03 (diff)
downloadscummvm-rg350-fff20668728536cf5077714b214ad69d79be5cc3.tar.gz
scummvm-rg350-fff20668728536cf5077714b214ad69d79be5cc3.tar.bz2
scummvm-rg350-fff20668728536cf5077714b214ad69d79be5cc3.zip
TOON: Fixed bug #3085999 with bad mouse button behavior
Bug #3085999: TOON: "Exiting inventory screen loop" Now the events are fired on mouse down instead of on mouse up. svn-id: r53540
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r--engines/toon/toon.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 1c90983769..dcc061321c 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1223,9 +1223,9 @@ void ToonEngine::clickEvent() {
bool leftButton = false;
bool rightButton = false;
- if ((_lastMouseButton & 0x1) == 1 && (_mouseButton & 0x1) == 0)
+ if ((_lastMouseButton & 0x1) == 0 && (_mouseButton & 0x1) == 1)
leftButton = true;
- if ((_lastMouseButton & 0x2) == 2 && (_mouseButton & 0x2) == 0)
+ if ((_lastMouseButton & 0x2) == 0 && (_mouseButton & 0x2) == 2)
rightButton = true;
_lastMouseButton = _mouseButton;
@@ -2475,7 +2475,9 @@ int32 ToonEngine::showInventory() {
}
_gameState->_currentScrollValue = oldScrollValue;
- _gameState->_inInventory = false;
+ _gameState->_inInventory = false;
+ _mouseButton = 0;
+ _lastMouseButton = 0x3;
fadeOut(5);
if (_gameState->_inCloseUp) {