diff options
author | Martin Kiewitz | 2010-04-17 20:43:09 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-04-17 20:43:09 +0000 |
commit | aaa6e7ee541fc8d149ffc536e9ff6a015b40d179 (patch) | |
tree | 6ecbf957068c7c322f99e68a3801eab60b938836 /engines/sci/event.cpp | |
parent | 499e58caf02dafbb9c79dafdfd357c6ded31c7a8 (diff) | |
download | scummvm-rg350-aaa6e7ee541fc8d149ffc536e9ff6a015b40d179.tar.gz scummvm-rg350-aaa6e7ee541fc8d149ffc536e9ff6a015b40d179.tar.bz2 scummvm-rg350-aaa6e7ee541fc8d149ffc536e9ff6a015b40d179.zip |
SCI: key presses of extended chars (umlauts, etc.) will now get ignored in games that don't support them (which is all non-multilingual games)
svn-id: r48693
Diffstat (limited to 'engines/sci/event.cpp')
-rw-r--r-- | engines/sci/event.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index a6df0d7863..e1358b38ae 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -36,7 +36,11 @@ namespace Sci { #define SCANCODE_ROWS_NR 3 -SciEvent::SciEvent() { +SciEvent::SciEvent(ResourceManager *resMan) + : _resMan(resMan) { + + // Check, if font of current game includes extended chars + _fontIsExtended = _resMan->detectFontExtended(); } SciEvent::~SciEvent() { @@ -167,6 +171,17 @@ sciEvent SciEvent::getFromScummVM() { // Directly accept most common keys without conversion input.type = SCI_EVENT_KEYBOARD; if ((input.character >= 0x80) && (input.character <= 0xFF)) { + // If there is no extended font, we will just clear the current event + // Sierra SCI actually accepted those characters, but didn't display them inside textedit-controls + // because the characters were missing inside the font(s) + // We filter them out for non-multilingual games because of that + if (!_fontIsExtended) { + input.type = SCI_EVENT_NONE; + input.character = 0; + input.data = 0; + input.modifiers = 0; + return input; + } // we get 8859-1 character, we need dos (cp850/437) character for multilingual sci01 games // TODO: check, if we get 8859-1 on all platforms input.character = codepagemap_88591toDOS[input.character & 0x7f]; |