Fix incorrect cast in Cursor::loadFromPixels Unix implementation
This commit is contained in:
parent
2837b3623b
commit
28279c0686
@ -80,10 +80,10 @@ bool CursorImpl::loadFromPixelsARGB(const Uint8* pixels, Vector2u size, Vector2u
|
|||||||
const std::size_t numPixels = size.x * size.y;
|
const std::size_t numPixels = size.x * size.y;
|
||||||
for (std::size_t pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex)
|
for (std::size_t pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex)
|
||||||
{
|
{
|
||||||
cursorImage->pixels[pixelIndex] = static_cast<Uint8>(pixels[pixelIndex * 4 + 2] +
|
cursorImage->pixels[pixelIndex] = static_cast<Uint32>(pixels[pixelIndex * 4 + 2] +
|
||||||
(pixels[pixelIndex * 4 + 1] << 8) +
|
(pixels[pixelIndex * 4 + 1] << 8) +
|
||||||
(pixels[pixelIndex * 4 + 0] << 16) +
|
(pixels[pixelIndex * 4 + 0] << 16) +
|
||||||
(pixels[pixelIndex * 4 + 3] << 24));
|
(pixels[pixelIndex * 4 + 3] << 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the cursor.
|
// Create the cursor.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user