diff options
author | Oystein Eftevaag | 2006-06-18 10:39:57 +0000 |
---|---|---|
committer | Oystein Eftevaag | 2006-06-18 10:39:57 +0000 |
commit | 499b5491eb73b0c9d40ca2e72dda076e2a2e6c24 (patch) | |
tree | 9765e0168faff28f48f4f7ec01ca925a62c129a7 | |
parent | 2462289c50498c2da9c87304e0efdbfb63b962d9 (diff) | |
download | scummvm-rg350-499b5491eb73b0c9d40ca2e72dda076e2a2e6c24.tar.gz scummvm-rg350-499b5491eb73b0c9d40ca2e72dda076e2a2e6c24.tar.bz2 scummvm-rg350-499b5491eb73b0c9d40ca2e72dda076e2a2e6c24.zip |
Makes sure updateScreen() is called once in a while in the menu polling loop, to give backends some drawing time for virtual keyboards etc
svn-id: r23169
-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; |