From 565c23b601d6c59ad08cfcae189b9ae896f09912 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 11 May 2009 20:58:55 +0000 Subject: Fix bug #1946262: "LSL1: Age Verification answer input not working" svn-id: r40468 --- engines/agi/keyboard.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/agi/keyboard.cpp') 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(); -- cgit v1.2.3