[Scummvm-cvs-logs] SF.net SVN: scummvm:[38868] scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Feb 24 23:48:39 CET 2009
Revision: 38868
http://scummvm.svn.sourceforge.net/scummvm/?rev=38868&view=rev
Author: thebluegr
Date: 2009-02-24 22:48:39 +0000 (Tue, 24 Feb 2009)
Log Message:
-----------
Process modifier keys (capslock, numlock, scrollock)
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-24 22:41:58 UTC (rev 38867)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp 2009-02-24 22:48:39 UTC (rev 38868)
@@ -351,8 +351,25 @@
((modifiers & Common::KBD_ALT) ? SCI_EVM_ALT : 0) |
((modifiers & Common::KBD_CTRL) ? SCI_EVM_CTRL : 0) |
((modifiers & Common::KBD_SHIFT) ? SCI_EVM_LSHIFT | SCI_EVM_RSHIFT : 0);
- //TODO: SCI_EVM_SCRLOCK SCI_EVM_NUMLOCK SCI_EVM_CAPSLOCK SCI_EVM_INSERT
+ // 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
+ if (ev.type == Common::EVENT_KEYDOWN) {
+ switch (ev.kbd.keycode) {
+ case Common::KEYCODE_CAPSLOCK:
+ input.buckybits |= SCI_EVM_CAPSLOCK;
+ break;
+ case Common::KEYCODE_NUMLOCK:
+ input.buckybits |= SCI_EVM_NUMLOCK;
+ break;
+ case Common::KEYCODE_SCROLLOCK:
+ input.buckybits |= SCI_EVM_SCRLOCK;
+ break;
+ }
+ }
+
+ //TODO: SCI_EVM_INSERT
+
switch (ev.type) {
// Keyboard events
case Common::EVENT_KEYDOWN:
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