macOS: Fix launcher and icon colours being swapped when compiled with recent SDK versions

This commit is contained in:
UnknownShadow200 2023-12-02 13:20:17 +11:00
parent a614100b0c
commit 2a80bf833e
2 changed files with 5 additions and 5 deletions

View File

@ -21,8 +21,8 @@ jobs:
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\" LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
cd src cd src
clang *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -o cc-mac64-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc MACOSX_DEPLOYMENT_TARGET=10.9 clang *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -o cc-mac64-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
clang *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-mac64-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc MACOSX_DEPLOYMENT_TARGET=10.9 clang *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-mac64-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
- uses: ./.github/actions/notify_failure - uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}

View File

@ -209,8 +209,8 @@ void Window_Init(void) {
/*########################################################################################################################* /*########################################################################################################################*
*-----------------------------------------------------------Window--------------------------------------------------------* *-----------------------------------------------------------Window--------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
#ifndef kCGBitmapByteOrder32Host #if !defined MAC_OS_X_VERSION_10_4
// Undefined in < 10.4 SDK. No issue since < 10.4 is only Big Endian PowerPC anyways // Doesn't exist in < 10.4 SDK. No issue since < 10.4 is only Big Endian PowerPC anyways
#define kCGBitmapByteOrder32Host 0 #define kCGBitmapByteOrder32Host 0
#endif #endif
@ -810,7 +810,7 @@ void GLContext_SetFpsLimit(cc_bool vsync, float minFrameMs) {
[ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval]; [ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval];
} }
/* kCGLCPCurrentRendererID is only available on macOS 10.4 and later */ // kCGLCPCurrentRendererID is only available on macOS 10.4 and later
#if defined MAC_OS_X_VERSION_10_4 #if defined MAC_OS_X_VERSION_10_4
static const char* GetAccelerationMode(CGLContextObj ctx) { static const char* GetAccelerationMode(CGLContextObj ctx) {
GLint fGPU, vGPU; GLint fGPU, vGPU;