SCI32: Update screen on frameout, instead of in the event loop
This commit is contained in:
parent
63345b2b70
commit
d0517f515e
5 changed files with 8 additions and 3 deletions
|
@ -236,7 +236,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
|
||||||
// check bugs #3058865 and #3127824
|
// check bugs #3058865 and #3127824
|
||||||
if (s->_gameIsBenchmarking) {
|
if (s->_gameIsBenchmarking) {
|
||||||
// Game is benchmarking, don't add a delay
|
// Game is benchmarking, don't add a delay
|
||||||
} else {
|
} else if (getSciVersion() < SCI_VERSION_2) {
|
||||||
g_system->delayMillis(10);
|
g_system->delayMillis(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,9 @@ SciEvent EventManager::getSciEvent(uint32 mask) {
|
||||||
SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point() };
|
SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point() };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EventManager::updateScreen();
|
if (getSciVersion() < SCI_VERSION_2) {
|
||||||
|
updateScreen();
|
||||||
|
}
|
||||||
|
|
||||||
// Get all queued events from graphics driver
|
// Get all queued events from graphics driver
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -122,6 +122,7 @@ void GfxCursor32::drawToHardware(const DrawRegion &source) {
|
||||||
byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset;
|
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->copyRectToScreen(sourcePixel, source.rect.width(), drawRect.left, drawRect.top, drawRect.width(), drawRect.height());
|
||||||
|
g_system->updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxCursor32::unhide() {
|
void GfxCursor32::unhide() {
|
||||||
|
|
|
@ -1108,6 +1108,7 @@ void GfxFrameout::mergeToShowList(const Common::Rect &drawRect, RectList &showLi
|
||||||
|
|
||||||
void GfxFrameout::showBits() {
|
void GfxFrameout::showBits() {
|
||||||
if (!_showList.size()) {
|
if (!_showList.size()) {
|
||||||
|
g_system->updateScreen();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1146,6 +1147,7 @@ void GfxFrameout::showBits() {
|
||||||
_cursor->donePainting();
|
_cursor->donePainting();
|
||||||
|
|
||||||
_showList.clear();
|
_showList.clear();
|
||||||
|
g_system->updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges) {
|
void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges) {
|
||||||
|
|
|
@ -295,7 +295,7 @@ void GfxPalette32::updateHardware(const bool updateScreen) {
|
||||||
|
|
||||||
g_system->getPaletteManager()->setPalette(bpal, 0, 256);
|
g_system->getPaletteManager()->setPalette(bpal, 0, 256);
|
||||||
if (updateScreen) {
|
if (updateScreen) {
|
||||||
g_sci->getEventManager()->updateScreen();
|
g_system->updateScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue