[Scummvm-git-logs] scummvm master -> 9d833af3d0d620a8099726dfeff1985c97acaa51

athrxx noreply at scummvm.org
Fri Jul 12 22:33:15 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9d833af3d0 SCI: fix video display regression


Commit: 9d833af3d0d620a8099726dfeff1985c97acaa51
    https://github.com/scummvm/scummvm/commit/9d833af3d0d620a8099726dfeff1985c97acaa51
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-13T00:33:00+02:00

Commit Message:
SCI: fix video display regression

Changed paths:
    engines/sci/graphics/gfxdrivers.cpp
    engines/sci/graphics/screen.cpp


diff --git a/engines/sci/graphics/gfxdrivers.cpp b/engines/sci/graphics/gfxdrivers.cpp
index 6c2a2e3bf19..12c16d82872 100644
--- a/engines/sci/graphics/gfxdrivers.cpp
+++ b/engines/sci/graphics/gfxdrivers.cpp
@@ -171,7 +171,7 @@ void updateBitmapBuffer(byte *dst, int dstPitch, const byte *src, int srcPitch,
 void GfxDefaultDriver::copyRectToScreen(const byte *src, int srcX, int srcY, int pitch, int destX, int destY, int w, int h, const PaletteMod *palMods, const byte *palModMapping) {
 	GFXDRV_ASSERT_READY;
 
-	src += (srcY * pitch + srcX);
+	src += (srcY * pitch + srcX * _srcPixelSize);
 	if (src != _currentBitmap)
 		updateBitmapBuffer(_currentBitmap, _screenW * _srcPixelSize, src, pitch, destX * _srcPixelSize, destY, w * _srcPixelSize, h);
 
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 42e79c24664..01ccbc08a59 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -294,7 +294,7 @@ void GfxScreen::copyToScreen() {
 }
 
 void GfxScreen::copyVideoFrameToScreen(const byte *buffer, int pitch, const Common::Rect &rect) {
-	_gfxDrv->copyRectToScreen(buffer, rect.left, rect.top, pitch, rect.left, rect.top, rect.width(), rect.height(), _paletteModsEnabled ? _paletteMods : nullptr, _paletteMapScreen);
+	_gfxDrv->copyRectToScreen(buffer, 0, 0, pitch, rect.left, rect.top, rect.width(), rect.height(), _paletteModsEnabled ? _paletteMods : nullptr, _paletteMapScreen);
 }
 
 void GfxScreen::kernelSyncWithFramebuffer() {




More information about the Scummvm-git-logs mailing list