aboutsummaryrefslogtreecommitdiff
path: root/sword2/console.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-07-09 13:21:21 +0000
committerTorbjörn Andersson2005-07-09 13:21:21 +0000
commitf7a6729a01ce8c07dddf4a7f7c0b25f8690e2c1a (patch)
treed14d72b8cc3acabeb0877fd00a0f358f01812306 /sword2/console.cpp
parent866d3e3db357293aea3e70a55b3944bf3dccd5ac (diff)
downloadscummvm-rg350-f7a6729a01ce8c07dddf4a7f7c0b25f8690e2c1a.tar.gz
scummvm-rg350-f7a6729a01ce8c07dddf4a7f7c0b25f8690e2c1a.tar.bz2
scummvm-rg350-f7a6729a01ce8c07dddf4a7f7c0b25f8690e2c1a.zip
This should really be two or three different commits, but I'm too lazy for
that: * Re-worked the elevator script bug workaround so that it's more consistent with the other two script bug workarounds. * Some renamings to make it more clear that game events and input events are two completely different things. * Added function for clearing pending input events, and used that to fix an annoying keyboard repeat bug when closing the debug console. (The console would keep re-opening because the key press to open it kept repeating even though the key had been released.) svn-id: r18522
Diffstat (limited to 'sword2/console.cpp')
-rw-r--r--sword2/console.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sword2/console.cpp b/sword2/console.cpp
index f09d268731..76a96ea7fb 100644
--- a/sword2/console.cpp
+++ b/sword2/console.cpp
@@ -154,6 +154,7 @@ void Debugger::postEnter() {
bool Debugger::Cmd_Exit(int argc, const char **argv) {
_detach_now = true;
+ _vm->clearInputEvents();
return false;
}
@@ -584,15 +585,15 @@ bool Debugger::Cmd_Var(int argc, const char **argv) {
}
bool Debugger::Cmd_Rect(int argc, const char **argv) {
- uint32 filter = _vm->setEventFilter(0);
+ uint32 filter = _vm->setInputEventFilter(0);
_definingRectangles = !_definingRectangles;
if (_definingRectangles) {
- _vm->setEventFilter(filter & ~(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP));
+ _vm->setInputEventFilter(filter & ~(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP));
DebugPrintf("Mouse rectangles enabled\n");
} else {
- _vm->setEventFilter(filter | RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP);
+ _vm->setInputEventFilter(filter | RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP);
DebugPrintf("Mouse rectangles disabled\n");
}