mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
PPC mac: Fix launcher not drawing when compiled with more recent SDK
This commit is contained in:
parent
5f937f6a06
commit
7848bb060c
@ -216,9 +216,12 @@ void Window_Free(void) { }
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------------Window--------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#if !defined MAC_OS_X_VERSION_10_4
|
||||
// Doesn't exist in < 10.4 SDK. No issue since < 10.4 is only Big Endian PowerPC anyways
|
||||
#define kCGBitmapByteOrder32Host 0
|
||||
#ifdef CC_BIG_ENDIAN
|
||||
/* Default byte order is big endian */
|
||||
/* Also can't use kCGBitmapByteOrder32Host because that doesn't exist in older SDKs */
|
||||
#define BITMAP_BYTE_ORDER 0
|
||||
#else
|
||||
#define BITMAP_BYTE_ORDER kCGBitmapByteOrder32Little
|
||||
#endif
|
||||
|
||||
static void RefreshWindowBounds(void) {
|
||||
@ -734,8 +737,9 @@ static void DoDrawFramebuffer(NSRect dirty) {
|
||||
// TODO: REPLACE THIS AWFUL HACK
|
||||
provider = CGDataProviderCreateWithData(NULL, fb_bmp.scan0,
|
||||
Bitmap_DataSize(fb_bmp.width, fb_bmp.height), NULL);
|
||||
|
||||
image = CGImageCreate(fb_bmp.width, fb_bmp.height, 8, 32, fb_bmp.width * 4, colorSpace,
|
||||
kCGBitmapByteOrder32Host | kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0);
|
||||
BITMAP_BYTE_ORDER | kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0);
|
||||
|
||||
CGContextDrawImage(context, rect, image);
|
||||
CGContextSynchronize(context);
|
||||
|
Loading…
x
Reference in New Issue
Block a user