diff options
author | Martin Kiewitz | 2010-07-29 10:48:54 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-29 10:48:54 +0000 |
commit | 6b63c951eb3cd218b496c190359ad705ee043791 (patch) | |
tree | 6a30be64416355f704ae0a69dee792fa7661473e /engines | |
parent | 82bf2437e34434a05392754b53853e21d27cfdd5 (diff) | |
download | scummvm-rg350-6b63c951eb3cd218b496c190359ad705ee043791.tar.gz scummvm-rg350-6b63c951eb3cd218b496c190359ad705ee043791.tar.bz2 scummvm-rg350-6b63c951eb3cd218b496c190359ad705ee043791.zip |
SCI: updating screen within kAnimate as well - fixes pseudo hang in eq1 credits (bug #3036154)
svn-id: r51459
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/event.cpp | 12 | ||||
-rw-r--r-- | engines/sci/event.h | 1 | ||||
-rw-r--r-- | engines/sci/graphics/animate.cpp | 5 |
3 files changed, 14 insertions, 4 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index ee301fff14..5923e501cf 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -343,16 +343,20 @@ SciEvent EventManager::getScummVMEvent() { return input; } -SciEvent EventManager::getSciEvent(unsigned int mask) { - //sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 }; - SciEvent event = { 0, 0, 0, 0 }; - +void EventManager::updateScreen() { // Update the screen here, since it's called very often. // Throttle the screen update rate to 60fps. if (g_system->getMillis() - g_sci->getEngineState()->_screenUpdateTime >= 1000 / 60) { g_system->updateScreen(); g_sci->getEngineState()->_screenUpdateTime = g_system->getMillis(); } +} + +SciEvent EventManager::getSciEvent(unsigned int mask) { + //sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 }; + SciEvent event = { 0, 0, 0, 0 }; + + EventManager::updateScreen(); // Get all queued events from graphics driver do { diff --git a/engines/sci/event.h b/engines/sci/event.h index 30098b0f6e..fade7dd337 100644 --- a/engines/sci/event.h +++ b/engines/sci/event.h @@ -114,6 +114,7 @@ public: EventManager(bool fontIsExtended); ~EventManager(); + void updateScreen(); SciEvent getSciEvent(unsigned int mask); bool getUsesNewKeyboardDirectionType(); diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index a883f572bb..c637ef8374 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -28,6 +28,7 @@ #include "graphics/primitives.h" #include "sci/sci.h" +#include "sci/event.h" #include "sci/engine/kernel.h" #include "sci/engine/state.h" #include "sci/engine/selector.h" @@ -597,6 +598,10 @@ void GfxAnimate::kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t if (_lastCastData.size() > 1) _s->_throttleTrigger = true; + // We update the screen here as well, some scenes like EQ1 credits run w/o calling kGetEvent thus we wouldn't update + // screen at all + g_sci->getEventManager()->updateScreen(); + _ports->setPort(oldPort); } |