[Scummvm-cvs-logs] SF.net SVN: scummvm: [30356] scummvm/trunk/engines/agi/agi.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Jan 9 13:59:11 CET 2008
Revision: 30356
http://scummvm.svn.sourceforge.net/scummvm/?rev=30356&view=rev
Author: thebluegr
Date: 2008-01-09 04:59:11 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Fixed some issues with AGI keyboard input
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.cpp
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp 2008-01-09 12:39:45 UTC (rev 30355)
+++ scummvm/trunk/engines/agi/agi.cpp 2008-01-09 12:59:11 UTC (rev 30356)
@@ -219,23 +219,10 @@
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;
+ // Not a special key, so get the ASCII code for it
+ key = event.kbd.ascii;
- // 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) ?
-
+ if (isalpha(key)) {
// Key is A-Z.
// Map Ctrl-A to 1, Ctrl-B to 2, etc.
if (event.kbd.flags & Common::KBD_CTRL) {
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