diff options
-rw-r--r-- | engines/agi/agi.cpp | 3 | ||||
-rw-r--r-- | engines/agi/keyboard.cpp | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index eeb64e14c0..79ea2a079a 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -73,6 +73,9 @@ void AgiEngine::processEvents() { newInputMode(INPUT_NORMAL); _gfx->printCharacter(_stringdata.x + strlen(_game.strings[_stringdata.str]) + 1, _stringdata.y, ' ', _game.colorFg, _game.colorBg); + } else if (_game.inputMode == INPUT_NONE) { + for (int n = 0; _predictiveResult[n]; n++) + keyEnqueue(_predictiveResult[n]); } } break; diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index d98e58d4d9..6aa7c0fe1f 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -140,8 +140,13 @@ int AgiEngine::handleController(int key) { (int)g_mouse.y >= _game.lineUserInput * CHAR_LINES && (int)g_mouse.y <= (_game.lineUserInput + 1) * CHAR_LINES) { if (predictiveDialog()) { - strcpy((char *)_game.inputBuffer, _predictiveResult); - handleKeys(KEY_ENTER); + if (_game.inputMode == INPUT_NONE) { + for (int n = 0; _predictiveResult[n]; n++) + keyEnqueue(_predictiveResult[n]); + } else { + strcpy((char *)_game.inputBuffer, _predictiveResult); + handleKeys(KEY_ENTER); + } } return true; } @@ -396,7 +401,7 @@ int AgiEngine::waitAnyKey() { _gfx->getKey(); } - debugC(3, kDebugLevelInput, "waiting..."); + debugC(3, kDebugLevelInput, "waiting... (any key)"); while (!(shouldQuit() || restartGame)) { _gfx->pollTimer(); /* msdos driver -> does nothing */ key = doPollKeyboard(); |