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--------------------------------------------------------*
|
*-----------------------------------------------------------Window--------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
#if !defined MAC_OS_X_VERSION_10_4
|
#ifdef CC_BIG_ENDIAN
|
||||||
// Doesn't exist in < 10.4 SDK. No issue since < 10.4 is only Big Endian PowerPC anyways
|
/* Default byte order is big endian */
|
||||||
#define kCGBitmapByteOrder32Host 0
|
/* 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
|
#endif
|
||||||
|
|
||||||
static void RefreshWindowBounds(void) {
|
static void RefreshWindowBounds(void) {
|
||||||
@ -716,7 +719,7 @@ static void DoDrawFramebuffer(NSRect dirty) {
|
|||||||
NSGraphicsContext* nsContext;
|
NSGraphicsContext* nsContext;
|
||||||
CGImageRef image;
|
CGImageRef image;
|
||||||
CGRect rect;
|
CGRect rect;
|
||||||
|
|
||||||
Event_RaiseVoid(&WindowEvents.Redrawing);
|
Event_RaiseVoid(&WindowEvents.Redrawing);
|
||||||
|
|
||||||
// Unfortunately CGImageRef is immutable, so changing the
|
// Unfortunately CGImageRef is immutable, so changing the
|
||||||
@ -734,8 +737,9 @@ static void DoDrawFramebuffer(NSRect dirty) {
|
|||||||
// TODO: REPLACE THIS AWFUL HACK
|
// TODO: REPLACE THIS AWFUL HACK
|
||||||
provider = CGDataProviderCreateWithData(NULL, fb_bmp.scan0,
|
provider = CGDataProviderCreateWithData(NULL, fb_bmp.scan0,
|
||||||
Bitmap_DataSize(fb_bmp.width, fb_bmp.height), NULL);
|
Bitmap_DataSize(fb_bmp.width, fb_bmp.height), NULL);
|
||||||
|
|
||||||
image = CGImageCreate(fb_bmp.width, fb_bmp.height, 8, 32, fb_bmp.width * 4, colorSpace,
|
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);
|
CGContextDrawImage(context, rect, image);
|
||||||
CGContextSynchronize(context);
|
CGContextSynchronize(context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user