[Scummvm-cvs-logs] SF.net SVN: scummvm:[47185] scummvm/trunk/engines/sci/event.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Jan 8 23:45:39 CET 2010
Revision: 47185
http://scummvm.svn.sourceforge.net/scummvm/?rev=47185&view=rev
Author: m_kiewitz
Date: 2010-01-08 22:45:38 +0000 (Fri, 08 Jan 2010)
Log Message:
-----------
SCI: fix for platform difference between linux and windows, makes Ctrl-Alt-keys work under linux as well (e.g. lsl1, age questions cheat)
Modified Paths:
--------------
scummvm/trunk/engines/sci/event.cpp
Modified: scummvm/trunk/engines/sci/event.cpp
===================================================================
--- scummvm/trunk/engines/sci/event.cpp 2010-01-08 22:14:55 UTC (rev 47184)
+++ scummvm/trunk/engines/sci/event.cpp 2010-01-08 22:45:38 UTC (rev 47185)
@@ -364,6 +364,14 @@
if (event.type == SCI_EVENT_KEYBOARD) {
// Do we still have to translate the key?
+ // When Ctrl AND Alt are pressed together with a regular key, Linux will give us control-key, Windows will give
+ // us the actual key. My opinion is that windows is right, because under DOS the keys worked the same, anyway
+ // we support the other case as well
+ if (event.modifiers & SCI_KEYMOD_ALT) {
+ if (event.character < 26)
+ event.character += 96;
+ }
+
if (getSciVersion() <= SCI_VERSION_1_MIDDLE) {
// TODO: find out if altify is also not needed for sci1late+, couldnt find any game that uses those keys
// Scancodify if appropriate
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