aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorD G Turner2019-09-22 00:11:51 +0100
committerD G Turner2019-09-22 00:11:51 +0100
commitd7972603e71f4d9cca0b998e72a47f2e1b07c095 (patch)
tree636172bbf19931589a663308563faf7c420a0e3f /engines/hdb
parent8f952f9ecc961b79000e3f1637a19f837f4db18b (diff)
downloadscummvm-rg350-d7972603e71f4d9cca0b998e72a47f2e1b07c095.tar.gz
scummvm-rg350-d7972603e71f4d9cca0b998e72a47f2e1b07c095.tar.bz2
scummvm-rg350-d7972603e71f4d9cca0b998e72a47f2e1b07c095.zip
HDB: Fix Game Breaking Bug in Right Mouse Button Handling
The right mouse button (which is the "Use" button for throwing gems etc.) function sets the Button B flag in the _buttons flag field, but never cleared it. This resulted in blocking of setting of movement waypoints with the left button and thus locked up the player character. You could avoid this by using the "Return" key which is also mapped to use, but this would only be possible on desktop ports or with a virtual keyboard. This commit fixes the mouse handling code to clear the flag and thus avoids future bug reports.
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/input.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp
index 093f525ec4..09aa5d9599 100644
--- a/engines/hdb/input.cpp
+++ b/engines/hdb/input.cpp
@@ -494,6 +494,9 @@ void Input::updateMouseButtons(int l, int m, int r) {
uint16 buttons = getButtons() | kButtonB;
setButtons(buttons);
+ } else if (!_mouseRButton) {
+ uint16 buttons = getButtons() & ~kButtonB;
+ setButtons(buttons);
}
}