From ea92e71747bba5ae2d4e44ddaddf6d17761d9745 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 4 Nov 2015 12:27:13 +1100 Subject: [PATCH] Use proper endian ordering for bitmaps on OSX. --- Launcher2/Gui/PlatformDrawer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Launcher2/Gui/PlatformDrawer.cs b/Launcher2/Gui/PlatformDrawer.cs index ae64ad76c..778cd7df1 100644 --- a/Launcher2/Gui/PlatformDrawer.cs +++ b/Launcher2/Gui/PlatformDrawer.cs @@ -57,8 +57,9 @@ namespace Launcher2 { IntPtr colorSpace = OSX.API.CGColorSpaceCreateDeviceRGB(); IntPtr provider = OSX.API.CGDataProviderCreateWithData( IntPtr.Zero, scan0, size, IntPtr.Zero ); + const uint flags = 4 | (4 << 12); IntPtr image = OSX.API.CGImageCreate( bmp.Width, bmp.Height, 8, 8 * 4, bmp.Stride, - colorSpace, 4, provider, IntPtr.Zero, 0, 0 ); + colorSpace, flags, provider, IntPtr.Zero, 0, 0 ); IntPtr context = IntPtr.Zero; OSStatus err = OSX.API.QDBeginCGContext( windowPort, ref context ); OSX.API.CheckReturn( err );