Fixed building with an older Mac OS X SDK
authorSam Lantinga <slouken@libsdl.org>
Mon, 28 Aug 2017 20:52:05 -0700
changeset 11402d459d8934897
parent 11401 7d6f83ec35c1
child 11403 4cdc242e4102
Fixed building with an older Mac OS X SDK
include/SDL_config_macosx.h
src/video/cocoa/SDL_cocoametalview.m
     1.1 --- a/include/SDL_config_macosx.h	Mon Aug 28 19:32:08 2017 -0700
     1.2 +++ b/include/SDL_config_macosx.h	Mon Aug 28 20:52:05 2017 -0700
     1.3 @@ -176,7 +176,7 @@
     1.4  
     1.5  /* Enable Vulkan support */
     1.6  /* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
     1.7 -#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
     1.8 +#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_REQUIRED >= 101100)
     1.9  #define SDL_VIDEO_VULKAN 1
    1.10  #else
    1.11  #define  SDL_VIDEO_VULKAN 0
     2.1 --- a/src/video/cocoa/SDL_cocoametalview.m	Mon Aug 28 19:32:08 2017 -0700
     2.2 +++ b/src/video/cocoa/SDL_cocoametalview.m	Mon Aug 28 20:52:05 2017 -0700
     2.3 @@ -40,7 +40,7 @@
     2.4  /* Return a Metal-compatible layer. */
     2.5  + (Class)layerClass
     2.6  {
     2.7 -  return [CAMetalLayer class];
     2.8 +  return NSClassFromString(@"CAMetalLayer");
     2.9  }
    2.10  
    2.11  /* Indicate the view wants to draw using a backing layer instead of drawRect. */