aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-11-07 20:30:39 +0000
committerTorbjörn Andersson2006-11-07 20:30:39 +0000
commitb1434f2632f0218147d7cb6dc9408cb8abbfc542 (patch)
treef597772dc319fe418c2692e6c500f7b285c22cbb /engines
parent4c7eaf5c55c9f762fd8ebd64d174cc6e11c70d46 (diff)
downloadscummvm-rg350-b1434f2632f0218147d7cb6dc9408cb8abbfc542.tar.gz
scummvm-rg350-b1434f2632f0218147d7cb6dc9408cb8abbfc542.tar.bz2
scummvm-rg350-b1434f2632f0218147d7cb6dc9408cb8abbfc542.zip
Fixed regression caused by recent debug console cleanup. The key stroke that
invoked the debug console would repeat after the console was closed. Another example why keyboard repeat should be centralized, I guess... svn-id: r24649
Diffstat (limited to 'engines')
-rw-r--r--engines/sword2/sword2.cpp15
-rw-r--r--engines/sword2/sword2.h1
2 files changed, 4 insertions, 12 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 99344106ad..082d2e6aea 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -348,6 +348,10 @@ int Sword2Engine::go() {
if (ke) {
if ((ke->modifiers == OSystem::KBD_CTRL && ke->keycode == 'd') || ke->ascii == '#' || ke->ascii == '~') {
+ // HACK: We have to clear the 'repeat' flag, or
+ // it will probably trigger a keyboard repeat
+ // immediately after the debug console closes.
+ _keyboardEvent.repeat = 0;
_debugger->attach();
} else if (ke->modifiers == 0 || ke->modifiers == OSystem::KBD_SHIFT) {
switch (ke->keycode) {
@@ -500,17 +504,6 @@ uint32 Sword2Engine::setInputEventFilter(uint32 filter) {
}
/**
- * Clear the input events. This is so that we won't get any keyboard repeat
- * right after using the debugging console.
- */
-
-void Sword2Engine::clearInputEvents() {
- _keyboardEvent.pending = false;
- _keyboardEvent.repeat = 0;
- _mouseEvent.pending = false;
-}
-
-/**
* OSystem Event Handler. Full of cross platform goodness and 99% fat free!
*/
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 7a5e142a64..df66a2cb5e 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -156,7 +156,6 @@ public:
uint32 setInputEventFilter(uint32 filter);
- void clearInputEvents();
void parseInputEvents();
bool checkForMouseEvents();