diff options
author | Filippos Karapetis | 2008-12-03 17:35:37 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-03 17:35:37 +0000 |
commit | 157e0512807a77ea13376cedb97274ab3829a68f (patch) | |
tree | 8143539be2200ec5a02934ecbfa652c348b22126 /engines/drascula/interface.cpp | |
parent | b471aab57d6bfbed72071b6605c1c1231c7315da (diff) | |
download | scummvm-rg350-157e0512807a77ea13376cedb97274ab3829a68f.tar.gz scummvm-rg350-157e0512807a77ea13376cedb97274ab3829a68f.tar.bz2 scummvm-rg350-157e0512807a77ea13376cedb97274ab3829a68f.zip |
Applied wjpalenstijn's patch to fix bug #2111826 - "DRASCULA: Inserting save game names lags"
svn-id: r35221
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) |