Call MacCursor::CreateCursorFromRGBABuffer with image data on macOS, noticed that the cursor does not appear correctly (in our case, not at all visible).
The issue is the row stride for the target pixel is not calculated correctly so the buffer is not fully written to.
PR for fix is here https://github.com/EpicGames/UnrealEngine/pull/14948
[Attachment Removed]
Steps to Reproduce[Attachment Removed]
Hi Cameron,
Thank you for pointing out this issue. There appears to be an additional with channel ordering. The NSBitmapImageRep is configured as RGB NSBitmapFormatAlphaFirst. As a result, the RGBA order of the FColor type needs to be swizzled. I will propose the following fix and advise when there is a CL to reference.
uint8* CursorPixels = [CursorImageRep bitmapData];
for (const FColor* Pixel = Pixels, * const BufferEnd = Pixels + Width * Height; Pixel < BufferEnd; ++Pixel)
{
*(CursorPixels++) = Pixel->A;
*(CursorPixels++) = Pixel->R;
*(CursorPixels++) = Pixel->G;
*(CursorPixels++) = Pixel->B;
}
Best regards.
[Attachment Removed]