From fc970b3c75fd64f399a4c22222d7e295825184c9 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 9 May 2004 13:32:04 +0000 Subject: Removed the buffering of mouse and keyboard events. I don't think any of our other engines do this, so there is little reason for BS2 to. I did add a filtering mechanism so that mouse button releases and scroll wheeling is ignored during normal gameplay, but I don't know if that was necessary either. Since this left little more than an empty husk where the Input class used to be, I've eliminated that class and buried its remains in Sword2Engine. svn-id: r13812 --- sword2/console.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sword2/console.cpp') diff --git a/sword2/console.cpp b/sword2/console.cpp index 4d9acfe3fc..fdb0088751 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -302,12 +302,17 @@ bool Debugger::Cmd_Var(int argc, const char **argv) { } bool Debugger::Cmd_Rect(int argc, const char **argv) { + uint32 filter = _vm->setEventFilter(0); + _definingRectangles = !_definingRectangles; - if (_definingRectangles) + if (_definingRectangles) { + _vm->setEventFilter(filter & ~(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP)); DebugPrintf("Mouse rectangles enabled\n"); - else + } else { + _vm->setEventFilter(filter | RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP); DebugPrintf("Mouse rectangles disabled\n"); + } _draggingRectangle = 0; return true; -- cgit v1.2.3