From d0517f515eb7f36ec7222f3d50f4917fbd7df5e7 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 26 Aug 2016 19:50:13 -0500 Subject: SCI32: Update screen on frameout, instead of in the event loop --- engines/sci/engine/kevent.cpp | 2 +- engines/sci/event.cpp | 4 +++- engines/sci/graphics/cursor32.cpp | 1 + engines/sci/graphics/frameout.cpp | 2 ++ engines/sci/graphics/palette32.cpp | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index 9250e0fc13..600dce3014 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -236,7 +236,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { // check bugs #3058865 and #3127824 if (s->_gameIsBenchmarking) { // Game is benchmarking, don't add a delay - } else { + } else if (getSciVersion() < SCI_VERSION_2) { g_system->delayMillis(10); } diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index b267d2ebc2..550cd46d48 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -370,7 +370,9 @@ SciEvent EventManager::getSciEvent(uint32 mask) { SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point() }; #endif - EventManager::updateScreen(); + if (getSciVersion() < SCI_VERSION_2) { + updateScreen(); + } // Get all queued events from graphics driver do { diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp index 88150db6e6..7889d61b09 100644 --- a/engines/sci/graphics/cursor32.cpp +++ b/engines/sci/graphics/cursor32.cpp @@ -122,6 +122,7 @@ void GfxCursor32::drawToHardware(const DrawRegion &source) { byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset; g_system->copyRectToScreen(sourcePixel, source.rect.width(), drawRect.left, drawRect.top, drawRect.width(), drawRect.height()); + g_system->updateScreen(); } void GfxCursor32::unhide() { diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 4e0aa22669..e886193ccc 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -1108,6 +1108,7 @@ void GfxFrameout::mergeToShowList(const Common::Rect &drawRect, RectList &showLi void GfxFrameout::showBits() { if (!_showList.size()) { + g_system->updateScreen(); return; } @@ -1146,6 +1147,7 @@ void GfxFrameout::showBits() { _cursor->donePainting(); _showList.clear(); + g_system->updateScreen(); } void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges) { diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index c7098bc3e4..db81669991 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -295,7 +295,7 @@ void GfxPalette32::updateHardware(const bool updateScreen) { g_system->getPaletteManager()->setPalette(bpal, 0, 256); if (updateScreen) { - g_sci->getEventManager()->updateScreen(); + g_system->updateScreen(); } } -- cgit v1.2.3