Browse Source

Fixed building with an older Mac OS X SDK

Sam Lantinga 7 years ago
parent
commit
1067b528d3
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/SDL_config_macosx.h
  2. 1 1
      src/video/cocoa/SDL_cocoametalview.m

+ 1 - 1
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

+ 1 - 1
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. */