aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/event.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-08 22:45:38 +0000
committerMartin Kiewitz2010-01-08 22:45:38 +0000
commit75a4ef14f1d75fc53b915cf3cfdaf59ae31c550f (patch)
treeae2c7ace3cfe8e7088b349d910244b89460a9d02 /engines/sci/event.cpp
parentb8727aefcc6b73dba5338872ce6bc35b856e84f7 (diff)
downloadscummvm-rg350-75a4ef14f1d75fc53b915cf3cfdaf59ae31c550f.tar.gz
scummvm-rg350-75a4ef14f1d75fc53b915cf3cfdaf59ae31c550f.tar.bz2
scummvm-rg350-75a4ef14f1d75fc53b915cf3cfdaf59ae31c550f.zip
SCI: fix for platform difference between linux and windows, makes Ctrl-Alt-keys work under linux as well (e.g. lsl1, age questions cheat)
svn-id: r47185
Diffstat (limited to 'engines/sci/event.cpp')
-rw-r--r--engines/sci/event.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 9c3de07366..715156eee9 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -364,6 +364,14 @@ sciEvent SciEvent::get(unsigned int mask) {
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