diff options
author | Paweł Kołodziejski | 2006-05-24 13:36:38 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2006-05-24 13:36:38 +0000 |
commit | 62b122ff340c53a9a0f2c97ee2268fec28be26d0 (patch) | |
tree | dea6d8ddc83eb22ab3feb8f40fb5fcb77fc4bc5f | |
parent | 3d441e579ec98b71761b4d9c7443fd278e1f5736 (diff) | |
download | scummvm-rg350-62b122ff340c53a9a0f2c97ee2268fec28be26d0.tar.gz scummvm-rg350-62b122ff340c53a9a0f2c97ee2268fec28be26d0.tar.bz2 scummvm-rg350-62b122ff340c53a9a0f2c97ee2268fec28be26d0.zip |
fixed modifier keys
svn-id: r22607
-rw-r--r-- | engines/agi/agi.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 54ba37093b..d7d9ace6d8 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -110,12 +110,14 @@ static void process_events() { mouse.button = 0; break; case OSystem::EVENT_KEYDOWN: + key_control = 0; + key_alt = 0; if (event.kbd.flags == OSystem::KBD_CTRL) { - key_control |= 1; + key_control = 1; key = 0; break; } else if (event.kbd.flags == OSystem::KBD_ALT) { - key_alt |= 1; + key_alt = 1; key = 0; break; } else if (event.kbd.flags == OSystem::KBD_SHIFT) { @@ -201,7 +203,7 @@ static void process_events() { key = KEY_ENTER; break; default: - if (!isalpha(key)) + if (key < 256 && !isalpha(key)) break; if (key_control) key = (key & ~0x20) - 0x40; @@ -212,19 +214,6 @@ static void process_events() { if (key) key_enqueue(key); break; - case OSystem::EVENT_KEYUP: - if (event.kbd.flags == OSystem::KBD_CTRL) { - key_control &= ~1; - key = 0; - break; - } else if (event.kbd.flags == OSystem::KBD_ALT) { - key_alt &= ~1; - key = 0; - break; - } else if (event.kbd.flags == OSystem::KBD_SHIFT) { - key = 0; - break; - } break; default: break; |