[Scummvm-cvs-logs] SF.net SVN: scummvm:[46249] scummvm/trunk/engines/sci/engine/kevent.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Dec 4 14:49:44 CET 2009


Revision: 46249
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46249&view=rev
Author:   m_kiewitz
Date:     2009-12-04 13:49:43 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
SCI: Convert characters to scancode, when Ctrl is pressed (fixes key-shortcuts not working in lsl5, lsl1, qfg1vga and others)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kevent.cpp

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2009-12-04 12:55:53 UTC (rev 46248)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2009-12-04 13:49:43 UTC (rev 46249)
@@ -85,9 +85,16 @@
 		} else {
 			PUT_SEL32V(segMan, obj, type, SCI_EVT_KEYBOARD); // Keyboard event
 			s->r_acc = make_reg(0, 1);
+
+			if (e.buckybits == SCI_EVM_CTRL) {
+				// If Control is pressed, we need to convert the actual key to a DOS scancode
+				if ((e.character >= 97) && (e.character <= 121)) {
+					e.character -= 96; // 'a' -> 0x01, etc.
+				}
+			}
+
 			PUT_SEL32V(segMan, obj, message, e.character);
-			// We only care about the translated
-			// character
+			// We only care about the translated character
 			PUT_SEL32V(segMan, obj, modifiers, e.buckybits&modifier_mask);
 		}
 		break;


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