[Scummvm-cvs-logs] SF.net SVN: scummvm: [24649] scummvm/trunk/engines/sword2

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Tue Nov 7 21:30:44 CET 2006


Revision: 24649
          http://svn.sourceforge.net/scummvm/?rev=24649&view=rev
Author:   eriktorbjorn
Date:     2006-11-07 12:30:39 -0800 (Tue, 07 Nov 2006)

Log Message:
-----------
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...

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/sword2.cpp
    scummvm/trunk/engines/sword2/sword2.h

Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp	2006-11-07 19:58:48 UTC (rev 24648)
+++ scummvm/trunk/engines/sword2/sword2.cpp	2006-11-07 20:30:39 UTC (rev 24649)
@@ -348,6 +348,10 @@
 
 		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 @@
 }
 
 /**
- * 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!
  */
 

Modified: scummvm/trunk/engines/sword2/sword2.h
===================================================================
--- scummvm/trunk/engines/sword2/sword2.h	2006-11-07 19:58:48 UTC (rev 24648)
+++ scummvm/trunk/engines/sword2/sword2.h	2006-11-07 20:30:39 UTC (rev 24649)
@@ -156,7 +156,6 @@
 
 	uint32 setInputEventFilter(uint32 filter);
 
-	void clearInputEvents();
 	void parseInputEvents();
 
 	bool checkForMouseEvents();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list