aboutsummaryrefslogtreecommitdiff
path: root/sword1/control.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2005-10-26 06:16:14 +0000
committerRobert Göffringmann2005-10-26 06:16:14 +0000
commit722e9a7986ee7d02f6b6ccc0fce588a4d1150d12 (patch)
treed758efafdb91e36898e49a7a49d692d404496439 /sword1/control.cpp
parent6f1016e71f61e398b7b7cf1e4cfeb8dcdbb11766 (diff)
downloadscummvm-rg350-722e9a7986ee7d02f6b6ccc0fce588a4d1150d12.tar.gz
scummvm-rg350-722e9a7986ee7d02f6b6ccc0fce588a4d1150d12.tar.bz2
scummvm-rg350-722e9a7986ee7d02f6b6ccc0fce588a4d1150d12.zip
fix for bug #1328022: BS1: savegame name text input ignores keypresses
svn-id: r19300
Diffstat (limited to 'sword1/control.cpp')
-rw-r--r--sword1/control.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp
index 06063584d7..b7afc1ada6 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -312,12 +312,7 @@ uint8 Control::runPanel(void) {
_system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480);
}
_system->updateScreen();
- // Use shorter delay when editing savegames names to minimize
- // the risk of keypresses being lost.
- if (mode == BUTTON_SAVE_PANEL && _selectedSavegame < 255)
- delay(20);
- else
- delay(1000 / 12);
+ delay(1000 / 12);
newMode = getClicks(mode, &retVal);
} while ((newMode != BUTTON_DONE) && (retVal == 0) && (!SwordEngine::_systemVars.engineQuit));
destroyButtons();
@@ -1047,7 +1042,9 @@ void Control::delay(uint32 msecs) {
_keyPressed = (byte)event.kbd.ascii;
_keyRepeatTime = now + kKeyRepeatInitialDelay;
_keyRepeat = _keyPressed;
- break;
+ // we skip the rest of the delay and return immediately
+ // to handle keyboard input
+ return;
case OSystem::EVENT_KEYUP:
_keyRepeatTime = 0;
_keyRepeat = 0;