aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-08-26 19:50:13 -0500
committerColin Snover2016-09-29 19:39:16 -0500
commitd0517f515eb7f36ec7222f3d50f4917fbd7df5e7 (patch)
treec50c47dc923210b941e518aa3337986b446de395 /engines
parent63345b2b70e72330b4f2845bd45e13117be41dc4 (diff)
downloadscummvm-rg350-d0517f515eb7f36ec7222f3d50f4917fbd7df5e7.tar.gz
scummvm-rg350-d0517f515eb7f36ec7222f3d50f4917fbd7df5e7.tar.bz2
scummvm-rg350-d0517f515eb7f36ec7222f3d50f4917fbd7df5e7.zip
SCI32: Update screen on frameout, instead of in the event loop
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kevent.cpp2
-rw-r--r--engines/sci/event.cpp4
-rw-r--r--engines/sci/graphics/cursor32.cpp1
-rw-r--r--engines/sci/graphics/frameout.cpp2
-rw-r--r--engines/sci/graphics/palette32.cpp2
5 files changed, 8 insertions, 3 deletions
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();
}
}