aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/keyboard.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2009-05-11 20:58:55 +0000
committerEugene Sandulenko2009-05-11 20:58:55 +0000
commit565c23b601d6c59ad08cfcae189b9ae896f09912 (patch)
treeed17f98725b14b33959c22b0790e455144bdaefd /engines/agi/keyboard.cpp
parent3b9f21be8025c37b5c10ba9fbbfaa1f47746b3a2 (diff)
downloadscummvm-rg350-565c23b601d6c59ad08cfcae189b9ae896f09912.tar.gz
scummvm-rg350-565c23b601d6c59ad08cfcae189b9ae896f09912.tar.bz2
scummvm-rg350-565c23b601d6c59ad08cfcae189b9ae896f09912.zip
Fix bug #1946262: "LSL1: Age Verification answer input not working"
svn-id: r40468
Diffstat (limited to 'engines/agi/keyboard.cpp')
-rw-r--r--engines/agi/keyboard.cpp11
1 files changed, 8 insertions, 3 deletions
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();