Fixed mac API.

This commit is contained in:
Armin Novak 2015-08-06 14:11:36 +02:00
parent 4a62e6bee4
commit be673f5766

View File

@ -1074,11 +1074,19 @@ BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer)
if (!cursor_data)
return FALSE;
mrdpCursor->cursor_data = cursor_data;
freerdp_image_copy_from_pointer_data(cursor_data, PIXEL_FORMAT_ARGB32,
pointer->width * 4, 0, 0, pointer->width, pointer->height,
pointer->xorMaskData, pointer->andMaskData, pointer->xorBpp, NULL);
if (freerdp_image_copy_from_pointer_data(
cursor_data, PIXEL_FORMAT_ARGB32,
pointer->width * 4, 0, 0, pointer->width, pointer->height,
pointer->xorMaskData, pointer->lengthXorMask,
pointer->andMaskData, pointer->lengthAndMask,
pointer->xorBpp, NULL) < 0)
{
free(cursor_data);
mrdpCursor->cursor_data = NULL;
return FALSE;
}
/* store cursor bitmap image in representation - required by NSImage */
bmiRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **) &cursor_data
pixelsWide:rect.size.width