Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer
authorSam Lantinga <slouken@libsdl.org>
Wed, 10 Jan 2018 10:42:40 -0800
changeset 118223f32b61fd611
parent 11821 43bba409e6d2
child 11823 56d562cbea17
Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer
src/render/metal/SDL_render_metal.m
     1.1 --- a/src/render/metal/SDL_render_metal.m	Sun Jan 07 22:00:37 2018 -0400
     1.2 +++ b/src/render/metal/SDL_render_metal.m	Wed Jan 10 10:42:40 2018 -0800
     1.3 @@ -653,14 +653,14 @@
     1.4  #if defined(__MACOSX__)
     1.5      maxtexsize = 16384;
     1.6  #elif defined(__TVOS__)
     1.7 +    maxtexsize = 8192;
     1.8  #ifdef __TVOS_11_0
     1.9 -    if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
    1.10 -        maxtexsize = 16384;
    1.11 -    } else
    1.12 +    if (@available(tvOS 11.0, *)) {
    1.13 +        if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
    1.14 +            maxtexsize = 16384;
    1.15 +        }
    1.16 +    }
    1.17  #endif
    1.18 -    {
    1.19 -        maxtexsize = 8192;
    1.20 -    }
    1.21  #else
    1.22  #ifdef __IPHONE_11_0
    1.23      if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]) {