From cb908ad0267fd2f8a5e5d19ca95fcb12f55bf291 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 21 Nov 2019 12:30:46 +1100 Subject: [PATCH] Fix last two commits causing 32 bit mac build to draw launcher window blue --- src/Window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Window.c b/src/Window.c index 8b70da82d..1e1e91063 100644 --- a/src/Window.c +++ b/src/Window.c @@ -2259,8 +2259,13 @@ void Window_DrawFramebuffer(Rect2D r) { provider = CGDataProviderCreateWithData(NULL, fb_bmp.Scan0, Bitmap_DataSize(fb_bmp.Width, fb_bmp.Height), NULL); +#ifdef CC_BIG_ENDIAN image = CGImageCreate(fb_bmp.Width, fb_bmp.Height, 8, 32, fb_bmp.Width * 4, colorSpace, kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0); +#else + image = CGImageCreate(fb_bmp.Width, fb_bmp.Height, 8, 32, fb_bmp.Width * 4, colorSpace, + kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0); +#endif CGContextDrawImage(context, rect, image); CGContextSynchronize(context);