From 96e0a747f9ce7d9abf4409967d7af2a8c6de5080 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 28 Jan 2004 04:11:06 +0000 Subject: Add fix from eriktorbjorn to make sure screen is always updated during cutscnes. svn-id: r12654 --- sword1/animation.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sword1') diff --git a/sword1/animation.cpp b/sword1/animation.cpp index 9c0661ee2d..4f3fa9df69 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -307,6 +307,16 @@ bool AnimationState::decodeFrame() { * dropping frames if we run behind and delaying if we are too fast */ + /* FIXME: We shouldn't use delay_msecs() here. + * We should use something like the delay() + * function in SwordEngine, so that events are + * handled properly. For now, at least call the + * backend's event handler so that redraw + * events are processed. + */ + + OSystem::Event event; + #ifdef BACKEND_8BIT if (checkPaletteSwitch() || (bgSoundStream == NULL) || (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){ @@ -320,8 +330,7 @@ bool AnimationState::decodeFrame() { while (_sys->get_msecs() < ticks) _sys->delay_msecs(10); } - - + _sys->poll_event(&event); } else warning("dropped frame %i", framenum); @@ -341,6 +350,7 @@ bool AnimationState::decodeFrame() { while (_sys->get_msecs() < ticks) _sys->delay_msecs(10); } + _sys->poll_event(&event); } else warning("dropped frame %i", framenum); -- cgit v1.2.3