[Scummvm-git-logs] scummvm master -> 389b51edbbfb86d5490904112131d453235c03f8
athrxx
noreply at scummvm.org
Wed Oct 9 23:10:35 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:
389b51edbb SCI: (KQ6Win Gfx driver) - fix glitch when in rgb rendering mode
Commit: 389b51edbbfb86d5490904112131d453235c03f8
https://github.com/scummvm/scummvm/commit/389b51edbbfb86d5490904112131d453235c03f8
Author: athrxx (athrxx at scummvm.org)
Date: 2024-10-10T01:09:06+02:00
Commit Message:
SCI: (KQ6Win Gfx driver) - fix glitch when in rgb rendering mode
Changed paths:
engines/sci/graphics/gfxdrivers.cpp
diff --git a/engines/sci/graphics/gfxdrivers.cpp b/engines/sci/graphics/gfxdrivers.cpp
index 91b2febf6fb..003c18e5aed 100644
--- a/engines/sci/graphics/gfxdrivers.cpp
+++ b/engines/sci/graphics/gfxdrivers.cpp
@@ -1266,9 +1266,16 @@ void UpscaledGfxDriver::initScreen(const Graphics::PixelFormat *format) {
}
void UpscaledGfxDriver::setPalette(const byte *colors, uint start, uint num, bool update, const PaletteMod *palMods, const byte *palModMapping) {
- GfxDefaultDriver::setPalette(colors, start, num, update, palMods, palModMapping);
- if (_pixelSize > 1 && update)
- updateScreen(0, 0, _screenW * _srcPixelSize, _screenH, palMods, palModMapping);
+ GFXDRV_ASSERT_READY;
+ if (_pixelSize == 1) {
+ GfxDefaultDriver::setPalette(colors, start, num, update, palMods, palModMapping);
+ return;
+ }
+ updatePalette(colors, start, num);
+ if (update)
+ updateScreen(0, 0, _screenW, _screenH, palMods, palModMapping);
+ if (_cursorUsesScreenPalette)
+ CursorMan.replaceCursorPalette(_currentPalette, 0, 256);
}
void UpscaledGfxDriver::copyRectToScreen(const byte *src, int srcX, int srcY, int pitch, int destX, int destY, int w, int h, const PaletteMod *palMods, const byte *palModMapping) {
More information about the Scummvm-git-logs
mailing list