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

eriktorbjorn noreply at scummvm.org
Wed Feb 16 23:22:20 UTC 2022


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:
e6e7366ba2 GROOVIE: Fix SDL cursor alpha with SDL in two cursor mode


Commit: e6e7366ba2956d53bb9b1e65a894208571075951
    https://github.com/scummvm/scummvm/commit/e6e7366ba2956d53bb9b1e65a894208571075951
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-02-17T00:19:14+01:00

Commit Message:
GROOVIE: Fix SDL cursor alpha with SDL in two cursor mode

This applies the recent fix from Cursor_v2::showFrame() to
Cursor_v2::show2Cursors() as well. Otherwise the eyeball cursor may
still be drawn with a transparent pupil.

Changed paths:
    engines/groovie/cursor.cpp


diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index db8f0f105ed..c2bc06018c6 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -428,8 +428,12 @@ void Cursor_v2::show2Cursors(Cursor_v2 *c1, uint16 frame1, Cursor_v2 *c2, uint16
 	c2->blendCursor(img, frame2, width, height);
 	c1->blendCursor(img, frame1, width, height);
 
+	// SDL uses keycolor even though we're using ABGR8888, so just set it to a pink color that isn't used
+	Graphics::PixelFormat format = g_system->getScreenFormat();
+	uint32 keycolor = format.ARGBToColor(0, 255, 128, 255);
+
 	// replaceCursor copies the buffer, so we're ok to delete it
-	CursorMan.replaceCursor((const byte *)img, width, height, c1->_hotspotX, c1->_hotspotY, 0, false, &c1->_format);
+	CursorMan.replaceCursor((const byte *)img, width, height, c1->_hotspotX, c1->_hotspotY, keycolor, false, &c1->_format);
 	delete[] img;
 }
 




More information about the Scummvm-git-logs mailing list