src/render/metal/SDL_render_metal.m
changeset 11733 490588c02a65
parent 11732 ad13456d6e7f
child 11734 6d6dc7d2a704
     1.1 --- a/src/render/metal/SDL_render_metal.m	Thu Dec 07 17:12:03 2017 -0800
     1.2 +++ b/src/render/metal/SDL_render_metal.m	Thu Dec 07 17:47:01 2017 -0800
     1.3 @@ -113,12 +113,12 @@
     1.4  static int
     1.5  IsMetalAvailable(const SDL_SysWMinfo *syswm)
     1.6  {
     1.7 -    if (syswm->subsystem != SDL_SYSWM_COCOA) {  // !!! FIXME: SDL_SYSWM_UIKIT for iOS, too!
     1.8 -        return SDL_SetError("Metal render target only supports Cocoa video target at the moment.");
     1.9 +    if (syswm->subsystem != SDL_SYSWM_COCOA && syswm->subsystem != SDL_SYSWM_UIKIT) {
    1.10 +        return SDL_SetError("Metal render target only supports Cocoa and UIKit video targets at the moment.");
    1.11      }
    1.12  
    1.13      // this checks a weak symbol.
    1.14 -#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
    1.15 +#if defined(__MACOSX__)
    1.16      if (MTLCreateSystemDefaultDevice == NULL) {  // probably on 10.10 or lower.
    1.17          return SDL_SetError("Metal framework not available on this system");
    1.18      }