Fixed random junk that may appear in transparency (alpha) channel of mouse cursor image

This commit is contained in:
alexey.lysiuk 2014-11-09 15:23:34 +02:00
parent fc8f260375
commit fa1d62ffbf

View file

@ -1539,6 +1539,8 @@ bool I_SetCursor(FTexture* cursorpic)
// Load bitmap data to representation // Load bitmap data to representation
BYTE* buffer = [bitmapImageRep bitmapData]; BYTE* buffer = [bitmapImageRep bitmapData];
memset(buffer, 0, imagePitch * imageHeight);
FBitmap bitmap(buffer, imagePitch, imageWidth, imageHeight); FBitmap bitmap(buffer, imagePitch, imageWidth, imageHeight);
cursorpic->CopyTrueColorPixels(&bitmap, 0, 0); cursorpic->CopyTrueColorPixels(&bitmap, 0, 0);