Use proper endian ordering for bitmaps on OSX.

This commit is contained in:
UnknownShadow200 2015-11-04 12:27:13 +11:00
parent 44a52d50ab
commit ea92e71747

View File

@ -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 );