aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-01-09 12:59:11 +0000
committerFilippos Karapetis2008-01-09 12:59:11 +0000
commit6f4acae161840986453e69b86ddf5fadefb75d13 (patch)
tree23f0b1631658083f66063c557c17cf4f0bbdca68 /engines/agi/agi.cpp
parent6d4d02a27f989db27f94aebce4f5f4475a02fb33 (diff)
downloadscummvm-rg350-6f4acae161840986453e69b86ddf5fadefb75d13.tar.gz
scummvm-rg350-6f4acae161840986453e69b86ddf5fadefb75d13.tar.bz2
scummvm-rg350-6f4acae161840986453e69b86ddf5fadefb75d13.zip
Fixed some issues with AGI keyboard input
svn-id: r30356
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r--engines/agi/agi.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 109278fb94..17359236f0 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -219,23 +219,10 @@ void AgiEngine::processEvents() {
key = KEY_BACKSPACE;
break;
default:
- // FIXME: This fixes assertions with isalpha below, but it essentially filters
- // out all function keys (control, alt and shift).
- // Well, actually, it does *not* filter them out (as we still pass the value
- // in key to keyEnqueue after this switch/case statement); but it means that
- // we perform no filtering on these input events, which is bad. That is, we
- // provide keycode in one format, and the AGI core expects some other format...
- // So maybe we should set key to 0 if key > 255?
- if (key > 255)
- break;
-
- // FIXME: We let lots of keys slip through here unchanged, passing our internal
- // keycode values directly to the AGI core. Do we really want that???
- if (isalpha(key)) {
- // FIXME: We probably should be using event.kbd.ascii at some point here,
- // but it's not completly clear how/where, this needs testing.
- // In particular, what about 'a' vs. 'A' (resp. the keys A vs. Shift-A) ?
+ // Not a special key, so get the ASCII code for it
+ key = event.kbd.ascii;
+ if (isalpha(key)) {
// Key is A-Z.
// Map Ctrl-A to 1, Ctrl-B to 2, etc.
if (event.kbd.flags & Common::KBD_CTRL) {