diff options
author | Eugene Sandulenko | 2019-11-06 22:04:47 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-13 22:07:08 +0100 |
commit | 84e6e1b8c506970ff7351515057e30313b013b43 (patch) | |
tree | ab49d88c9691b1b1fccc998b4df2229644734389 | |
parent | e52d6c96f00da6c9361e8044101ff915595c077d (diff) | |
download | scummvm-rg350-84e6e1b8c506970ff7351515057e30313b013b43.tar.gz scummvm-rg350-84e6e1b8c506970ff7351515057e30313b013b43.tar.bz2 scummvm-rg350-84e6e1b8c506970ff7351515057e30313b013b43.zip |
GRIFFON: Fix sluggishness in the inventory menu
-rw-r--r-- | engines/griffon/engine.cpp | 1 | ||||
-rw-r--r-- | engines/griffon/input.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/griffon/engine.cpp b/engines/griffon/engine.cpp index 291076cdaa..5c0a28d791 100644 --- a/engines/griffon/engine.cpp +++ b/engines/griffon/engine.cpp @@ -80,7 +80,6 @@ void GriffonEngine::mainLoop() { void GriffonEngine::updateEngine() { g_system->updateScreen(); - g_system->getEventManager()->pollEvent(_event); _ticksPassed = _ticks; _ticks = g_system->getMillis(); diff --git a/engines/griffon/input.cpp b/engines/griffon/input.cpp index 4b2ea5cff4..cc6a48dee7 100644 --- a/engines/griffon/input.cpp +++ b/engines/griffon/input.cpp @@ -43,8 +43,10 @@ namespace Griffon { void GriffonEngine::checkInputs() { int ntickdelay = 175; + bool _keyPressed = false; - g_system->getEventManager()->pollEvent(_event); + if (g_system->getEventManager()->pollEvent(_event)) + _keyPressed = true; _postInfoNbr = 0; @@ -307,7 +309,7 @@ __exit_do: _curEnemy = _lastNpc + _postInfoNbr; } } else { - if (_itemTicks < _ticks) { + if (_keyPressed && _event.type == Common::EVENT_KEYDOWN) { if (_event.kbd.keycode == Common::KEYCODE_UP) { _curItem = _curItem - 1; _itemTicks = _ticks + ntickdelay; |