diff --git a/sky/screen.cpp b/sky/screen.cpp index 8e904082f50..c95d0bba9f9 100644 --- a/sky/screen.cpp +++ b/sky/screen.cpp @@ -365,6 +365,15 @@ void SkyScreen::waitForTimer(void) { } } +void SkyScreen::waitForSequence(void) { + while (_seqInfo.running) { + OSystem::Event event; + + _system->delay_msecs(20); + while (_system->poll_event(&event)); + } +} + void SkyScreen::handleTimer(void) { _gotTick = true; diff --git a/sky/screen.h b/sky/screen.h index 6ad9cf63e56..80572671a07 100644 --- a/sky/screen.h +++ b/sky/screen.h @@ -65,7 +65,7 @@ public: void startSequenceItem(uint16 itemNum); void stopSequence(void); bool sequenceRunning(void) { return _seqInfo.running; }; - void waitForSequence(void) { while (_seqInfo.running) _system->delay_msecs(20); }; + void waitForSequence(void); uint32 seqFramesLeft(void) { return _seqInfo.framesLeft; }; uint8 *giveCurrent(void) { return _currentScreen; }; void halvePalette(void);