diff options
-rw-r--r-- | engines/kyra/gui.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 0e0d62d1ae..bb7e1d0b8a 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -806,6 +806,7 @@ void KyraEngine::calcCoords(Menu &menu) { void KyraEngine::gui_getInput() { OSystem::Event event; + static uint32 lastScreenUpdate = 0; uint32 now = _system->getMillis(); _mouseWheel = 0; @@ -824,6 +825,7 @@ void KyraEngine::gui_getInput() { _mouseX = event.mouse.x; _mouseY = event.mouse.y; _system->updateScreen(); + lastScreenUpdate = now; break; case OSystem::EVENT_WHEELUP: _mouseWheel = -1; @@ -844,6 +846,11 @@ void KyraEngine::gui_getInput() { } } + if (now - lastScreenUpdate > 50) { + _system->updateScreen(); + lastScreenUpdate = now; + } + if (!_keyboardEvent.pending && _keyboardEvent.repeat && now >= _keyboardEvent.repeat) { _keyboardEvent.pending = true; _keyboardEvent.repeat = now + 100; |