SCI: updating screen within kAnimate as well - fixes pseudo hang in eq1 credits (bug #3036154)

svn-id: r51459
This commit is contained in:
Martin Kiewitz 2010-07-29 10:48:54 +00:00
parent 82bf2437e3
commit 6b63c951eb
3 changed files with 14 additions and 4 deletions

View File

@ -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 {

View File

@ -114,6 +114,7 @@ public:
EventManager(bool fontIsExtended);
~EventManager();
void updateScreen();
SciEvent getSciEvent(unsigned int mask);
bool getUsesNewKeyboardDirectionType();

View File

@ -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);
}