Skip to content

Commit

Permalink
AGI: Revert revert the keyboard handling changes
Browse files Browse the repository at this point in the history
It seems the issues on AmigaOS aren't actually caused by the new
code. Reverting the revert.
  • Loading branch information
Martin Kiewitz committed Feb 1, 2016
1 parent cf51337 commit 14f338e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions engines/agi/keyboard.cpp
Expand Up @@ -136,7 +136,6 @@ void AgiEngine::processEvents() {
}

key = event.kbd.ascii;
#if 0
if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) {
if (!(event.kbd.flags & Common::KBD_NUM)) {
// HACK: Num-Lock not enabled
Expand All @@ -145,13 +144,8 @@ void AgiEngine::processEvents() {
key = 0;
}
}
#endif
// FIXME: Checking .ascii this way seems to cause issues on at least AmigaOS
// See bug #7009. For detailed information see engines/sci/event.cpp, EventManager::getScummVMEvent().
// For now we are using the same code as in SCI to make it work.
// Needs to get fixed in SDL backend / SDL itself.
//if ((key) && (key <= 0xFF)) {
if ((key) && (!(event.kbd.keycode & 0xFF00))) {

if ((key) && (key <= 0xFF)) {
// No special key, directly accept it
// Is ISO-8859-1, we need lower 128 characters only, which is plain ASCII, so no mapping required
if (Common::isAlpha(key)) {
Expand Down

0 comments on commit 14f338e

Please sign in to comment.