[Scummvm-git-logs] scummvm master -> d0c44d4ba60649eab8c27ec6e06aa30c266445b6
Die4Ever
noreply at scummvm.org
Fri Feb 11 04:45:25 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:
d0c44d4ba6 GROOVIE: fix cursor alpha with SDL
Commit: d0c44d4ba60649eab8c27ec6e06aa30c266445b6
https://github.com/scummvm/scummvm/commit/d0c44d4ba60649eab8c27ec6e06aa30c266445b6
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-02-10T22:45:04-06:00
Commit Message:
GROOVIE: fix cursor alpha with SDL
SDL uses keycolor even though we're using ABGR8888, so just set it to a pink color that isn't used
Changed paths:
engines/groovie/cursor.cpp
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index dd35c96dc6f..db8f0f105ed 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -373,7 +373,9 @@ void Cursor_v2::enable() {
void Cursor_v2::showFrame(uint16 frame) {
int offset = _width * _height * frame * 4;
- CursorMan.replaceCursor((const byte *)(_img + offset), _width, _height, _hotspotX, _hotspotY, 0, false, &_format);
+ // SDL uses keycolor even though we're using ABGR8888, so just set it to a pink color that isn't used
+ uint32 keycolor = _format.ARGBToColor(0, 255, 128, 255);
+ CursorMan.replaceCursor((const byte *)(_img + offset), _width, _height, _hotspotX, _hotspotY, keycolor, false, &_format);
}
void blendCursorPixel(uint32 &d, uint32 &s) {
More information about the Scummvm-git-logs
mailing list