mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-09 10:49:41 +00:00
Win32: Swap maskColor assignment based on alpha value
Looks like mask pixels was inverted.
(cherry picked from commit 362165ed9b)
This commit is contained in:
committed by
Sam Lantinga
parent
64f058d050
commit
1cb193a414
@@ -600,7 +600,7 @@ HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
|
||||
for (int x = 0; x < width; x++) {
|
||||
BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
|
||||
BYTE alpha = pixel[3];
|
||||
COLORREF maskColor = (alpha == 0) ? RGB(0, 0, 0) : RGB(255, 255, 255);
|
||||
COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
|
||||
SetPixel(hdcMem, x, y, maskColor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user