diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp index 2f7487322941..624714619e1d 100644 --- a/engines/sci/graphics/cursor32.cpp +++ b/engines/sci/graphics/cursor32.cpp @@ -122,7 +122,6 @@ 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() { @@ -381,6 +380,10 @@ void GfxCursor32::deviceMoved(Common::Point &position) { position.y = _restrictedArea.bottom - 1; } + if (_position == position) { + return; + } + _position = position; g_system->warpMouse(position.x, position.y); diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index e0506e67ace4..b4c842dd4a20 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -439,7 +439,7 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR robotPlayer.frameAlmostVisible(); } - _palette->updateHardware(!shouldShowBits); + _palette->updateHardware(); if (shouldShowBits) { showBits(); @@ -547,7 +547,7 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show _palette->submit(nextPalette); _palette->updateFFrame(); - _palette->updateHardware(false); + _palette->updateHardware(); showBits(); } diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index d13ae2c09789..de85b71a2c9e 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -455,7 +455,7 @@ void GfxPalette32::updateFFrame() { g_sci->_gfxRemap32->remapAllTables(_nextPalette != _currentPalette); } -void GfxPalette32::updateHardware(const bool updateScreen) { +void GfxPalette32::updateHardware() { if (_currentPalette == _nextPalette && !_gammaChanged) { return; } @@ -494,10 +494,6 @@ void GfxPalette32::updateHardware(const bool updateScreen) { } g_system->getPaletteManager()->setPalette(bpal, 0, 256); - if (updateScreen) { - g_system->updateScreen(); - } - _gammaChanged = false; } diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h index 267ec39d9645..0fcd7e00ab3d 100644 --- a/engines/sci/graphics/palette32.h +++ b/engines/sci/graphics/palette32.h @@ -240,11 +240,8 @@ class GfxPalette32 { /** * Copies all entries from `nextPalette` to `currentPalette` and updates the * backend's raw palette. - * - * @param updateScreen If true, this call will also tell the backend to draw - * to the screen. */ - void updateHardware(const bool updateScreen = true); + void updateHardware(); private: ResourceManager *_resMan; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 026c423d7596..9d6e4e0451fb 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -816,6 +816,14 @@ void SciEngine::sleep(uint32 msecs) { for (;;) { // let backend process events and update the screen _eventMan->getSciEvent(SCI_EVENT_PEEK); +#ifdef ENABLE_SCI32 + // If a game is in a wait loop, kFrameOut is not called, but mouse + // movement is still occurring and the screen needs to be updated to + // reflect it + if (getSciVersion() >= SCI_VERSION_2) { + g_system->updateScreen(); + } +#endif time = g_system->getMillis(); if (time + 10 < wakeUpTime) { g_system->delayMillis(10);