🩹 fix: no black border on virtual cursor (#604)

This commit is contained in:
Helloyunho 2025-07-15 00:10:15 +09:00 committed by GitHub
parent 7e1df12c63
commit 7cf24ae358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1258,7 +1258,7 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CreateCursorSurface(const CursorBitmap* p_
MxS32 pixel;
if (!isOpaque) {
pixel = RGB8888_CREATE(0, 0, 0, 0); // Transparent pixel
pixel = RGB8888_CREATE(0xff, 0, 0xff, 0); // Transparent pixel
}
else {
pixel = isBlack ? RGB8888_CREATE(0, 0, 0, 0xff) : RGB8888_CREATE(0xff, 0xff, 0xff, 0xff);
@ -1289,8 +1289,8 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CreateCursorSurface(const CursorBitmap* p_
}
default: {
DDCOLORKEY colorkey;
colorkey.dwColorSpaceHighValue = RGB8888_CREATE(0, 0, 0, 0);
colorkey.dwColorSpaceLowValue = RGB8888_CREATE(0, 0, 0, 0);
colorkey.dwColorSpaceHighValue = RGB8888_CREATE(0xff, 0, 0xff, 0);
colorkey.dwColorSpaceLowValue = RGB8888_CREATE(0xff, 0, 0xff, 0);
newSurface->SetColorKey(DDCKEY_SRCBLT, &colorkey);
break;
}