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
1 changed files with 2 additions and 0 deletions

View File

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