diff options
Diffstat (limited to 'engines/drascula/interface.cpp')
-rw-r--r-- | engines/drascula/interface.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index 32f07fce73..8294ddfbad 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -146,7 +146,8 @@ void DrasculaEngine::clearMenu() { } void DrasculaEngine::enterName() { - Common::KeyCode key, prevkey = Common::KEYCODE_INVALID; + Common::KeyCode key; + flushKeyBuffer(); int counter = 0; int v = 0, h = 0; char select2[23]; @@ -156,21 +157,10 @@ void DrasculaEngine::enterName() { copyBackground(115, 14, 115, 14, 176, 9, bgSurface, screenSurface); print_abc(select2, 117, 15); updateScreen(); - _system->delayMillis(100); key = getScan(); - // Artifically decrease repeat rate. - // Part of bug fix#2017432 DRASCULA: Typing is slow when you save a game - // Alternative is to roll our own event loop - if (key == prevkey) - if (++counter == 3) { - counter = 0; - prevkey = Common::KEYCODE_INVALID; - } - - if (key != 0 && key != prevkey) { - prevkey = key; + if (key != 0) { if (key >= 0 && key <= 0xFF && isalpha(key)) select2[v] = tolower(key); else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE) |