From 1067b528d35cd699566f3cffca7cb5a01df27087 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 28 Aug 2017 20:52:05 -0700 Subject: [PATCH] Fixed building with an older Mac OS X SDK --- include/SDL_config_macosx.h | 2 +- src/video/cocoa/SDL_cocoametalview.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index 610a8eba9..1951b0927 100644 --- a/include/SDL_config_macosx.h +++ b/include/SDL_config_macosx.h @@ -176,7 +176,7 @@ /* Enable Vulkan support */ /* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */ -#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) +#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_REQUIRED >= 101100) #define SDL_VIDEO_VULKAN 1 #else #define SDL_VIDEO_VULKAN 0 diff --git a/src/video/cocoa/SDL_cocoametalview.m b/src/video/cocoa/SDL_cocoametalview.m index 5485588fb..f1d0f6c03 100644 --- a/src/video/cocoa/SDL_cocoametalview.m +++ b/src/video/cocoa/SDL_cocoametalview.m @@ -40,7 +40,7 @@ /* Return a Metal-compatible layer. */ + (Class)layerClass { - return [CAMetalLayer class]; + return NSClassFromString(@"CAMetalLayer"); } /* Indicate the view wants to draw using a backing layer instead of drawRect. */