[Scummvm-cvs-logs] SF.net SVN: scummvm:[38882] scummvm/trunk/engines/sci/gfx/gfx_driver.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Feb 25 20:05:55 CET 2009


Revision: 38882
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38882&view=rev
Author:   fingolfin
Date:     2009-02-25 19:05:54 +0000 (Wed, 25 Feb 2009)

Log Message:
-----------
SCI: Added remark that we don't track capslock, numlock, scrlock properly

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-25 18:59:00 UTC (rev 38881)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-25 19:05:54 UTC (rev 38882)
@@ -336,6 +336,16 @@
 
 		// We add the modifier key status to buckybits
 		// SDL sends a keydown event if a modifier key is turned on and a keyup event if it's off
+		//
+		// FIXME: This code is semi-bogus. It only records the modifier key being *pressed*.
+		// It does not track correctly whether capslock etc. is active. To do that, we
+		// would have to record the fact that the modifier was pressed in global var,
+		// and also watch for Common::EVENT_KEYUP events.
+		// But this is still not quite good enough, because not all events might
+		// pass through here (e.g. the GUI might be running with its own event loop).
+		//
+		// The best solution likely would be to add code to the EventManager class
+		// for tracking which keys are pressed and which are not...
 		if (ev.type == Common::EVENT_KEYDOWN) {
  			switch (ev.kbd.keycode) {
 			case Common::KEYCODE_CAPSLOCK:
@@ -351,7 +361,6 @@
 				break;
 			}
 		}
-
 		//TODO: SCI_EVM_INSERT
 
 		switch (ev.type) {


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