From fa1d62ffbf509a4231a58488a53676c7c2a0558e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 9 Nov 2014 15:23:34 +0200 Subject: [PATCH] Fixed random junk that may appear in transparency (alpha) channel of mouse cursor image --- src/cocoa/i_backend_cocoa.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cocoa/i_backend_cocoa.mm b/src/cocoa/i_backend_cocoa.mm index 859fcc495..e2bd70374 100644 --- a/src/cocoa/i_backend_cocoa.mm +++ b/src/cocoa/i_backend_cocoa.mm @@ -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);