From bbd5bcb7fdc0a20115ce1648d73a18a25bd7cc5f Mon Sep 17 00:00:00 2001 From: ws909 <37029098+ws909@users.noreply.github.com> Date: Thu, 26 Jan 2023 08:31:31 +0100 Subject: [PATCH] Attempt at fixing compilation errors for MacOS --- src/cocoa_init.m | 4 ++-- src/cocoa_platform.h | 1 + src/cocoa_window.m | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 213e41b1..8c60bb31 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -36,11 +36,11 @@ #include -#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 NSAppearanceName const NSAppearanceNameVibrantLight = @"NSAppearanceNameVibrantLight"; NSAppearanceName const NSAppearanceNameVibrantDark = @"NSAppearanceNameVibrantDark"; #endif -#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 101400 NSAppearanceName const NSAppearanceNameDarkAqua = @"NSAppearanceNameDarkAqua"; NSAppearanceName const NSAppearanceNameAccessibilityHighContrastAqua = @"NSAppearanceNameAccessibilityAqua"; NSAppearanceName const NSAppearanceNameAccessibilityHighContrastDarkAqua = @"NSAppearanceNameAccessibilityDarkAqua"; diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index 9246b4b8..84a0ace0 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -40,6 +40,7 @@ #else typedef void* id; typedef void NSAppearance; +typedef id NSString; #endif #if MAC_OS_X_VERSION_MIN_REQUIRED < 101300 diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 16bd5eb3..4e32731a 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1935,7 +1935,7 @@ GLFWtheme* _glfwGetThemeCocoa(_GLFWwindow* window) if (@available(macOS 10.09, *)) { - nsAppearanceToGLFWTheme([window->ns.object appearance], theme); + nsAppearanceToGLFWTheme([(NSWindow*)window->ns.object appearance], theme); } if (@available(macOS 10.14, *)) {