From 72d45079182c47f1c029494acb2e2c3f61cbdea8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 10 Jan 2018 10:42:40 -0800 Subject: [PATCH] Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer --- src/render/metal/SDL_render_metal.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m index 97cd218a4..f7af72d42 100644 --- a/src/render/metal/SDL_render_metal.m +++ b/src/render/metal/SDL_render_metal.m @@ -653,14 +653,14 @@ METAL_CreateRenderer(SDL_Window * window, Uint32 flags) #if defined(__MACOSX__) maxtexsize = 16384; #elif defined(__TVOS__) + maxtexsize = 8192; #ifdef __TVOS_11_0 - if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) { - maxtexsize = 16384; - } else -#endif - { - maxtexsize = 8192; + if (@available(tvOS 11.0, *)) { + if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) { + maxtexsize = 16384; + } } +#endif #else #ifdef __IPHONE_11_0 if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]) {