diff options
author | Torbjörn Andersson | 2005-10-17 07:15:18 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-10-17 07:15:18 +0000 |
commit | 4a9bf821435be76615e7ab676bd26c4555ba2a3e (patch) | |
tree | 8bac4b9f8b28ba3e1dbdf3a5cf3d9fb426abb8b8 /sword1/control.cpp | |
parent | 290c8114de0b5ce09689253b4a9d8825a5c79c21 (diff) | |
download | scummvm-rg350-4a9bf821435be76615e7ab676bd26c4555ba2a3e.tar.gz scummvm-rg350-4a9bf821435be76615e7ab676bd26c4555ba2a3e.tar.bz2 scummvm-rg350-4a9bf821435be76615e7ab676bd26c4555ba2a3e.zip |
Decrease delay while editing savegame name. This way, there should be much
less risk of keypresses being lost.
svn-id: r19128
Diffstat (limited to 'sword1/control.cpp')
-rw-r--r-- | sword1/control.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp index f3221b1e14..0c3de90c1e 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -281,16 +281,17 @@ uint8 Control::runPanel(void) { if (_selectedSavegame < 255) { _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); bool visible = _cursorVisible; - if (_cursorTick == 0) + _cursorTick++; + if (_cursorTick == 7) _cursorVisible = true; - else if (_cursorTick == 3) + else if (_cursorTick == 14) { _cursorVisible = false; + _cursorTick = 0; + } if (_keyPressed) handleSaveKey(_keyPressed); else if (_cursorVisible != visible) showSavegameNames(); - if (++_cursorTick > 5) - _cursorTick = 0; } else { _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); } @@ -311,7 +312,12 @@ uint8 Control::runPanel(void) { _system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480); } _system->updateScreen(); - delay(1000 / 12); + // 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); newMode = getClicks(mode, &retVal); } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!SwordEngine::_systemVars.engineQuit)); destroyButtons(); |