[Scummvm-git-logs] scummvm master -> f56d3212c8a80aa4daced0927bdc625e87275303

AReim1982 noreply at scummvm.org
Fri Oct 23 13:48:08 UTC 2026


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

Summary:
f56d3212c8 WII: Fix colors of paletted cursors


Commit: f56d3212c8a80aa4daced0927bdc625e87275303
    https://github.com/scummvm/scummvm/commit/f56d3212c8a80aa4daced0927bdc625e87275303
Author: Alexander Reim (alexander at areim.de)
Date: 2026-10-23T15:46:08+02:00

Commit Message:
WII: Fix colors of paletted cursors

Ensure that paletted cursors use the correct color palette when their textures are created or updated.

This fixes incorrectly rendered cursor colors in some games.

Changed paths:
    backends/platform/wii/osystem_gfx.cpp


diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 837c6c25729..6cb41edf902 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -347,7 +347,11 @@ void OSystem_Wii::updateMousePalette() {
 			// In this case, clear the palette
 			memset(_texMouse.palette, 0, 256 * 2);
 		} else {
-			memcpy(_texMouse.palette, _texGame.palette, 256 * 2);
+			u8 r, b, g;
+			for (uint i = 0; i < 256; ++i) {
+				_pfRGB565.colorToRGB(_texGame.palette[i], r, g, b);
+				_texMouse.palette[i] = _pfRGB3444.ARGBToColor(0xff, r, g, b);
+			}
 		}
 
 		_cursorPaletteDirty = true;
@@ -677,7 +681,6 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX,
 
 	gfx_tex_format_t tex_format = GFX_TF_PALETTE_RGB5A3;
 	uint tw, th;
-	uint32 oldKeycolor = _mouseKeyColor;
 
 	if (!format)
 		_pfCursor = Graphics::PixelFormat::createFormatCLUT8();
@@ -760,6 +763,6 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX,
 	_cursorScaleX = fracToDouble(scaleX);
 	_cursorScaleY = fracToDouble(scaleY);
 
-	if (_pfCursor.bytesPerPixel == 1 && oldKeycolor != _mouseKeyColor)
+	if (_pfCursor.bytesPerPixel == 1)
 		updateMousePalette();
 }




More information about the Scummvm-git-logs mailing list