[Commits] SDL: Added availability check to fix compiler warning for symbol...

libsdl.org revision control commits-owner at libsdl.org
Wed Jan 10 10:34:51 PST 2018


details:   https://hg.libsdl.org/SDL/rev/3f32b61fd611
changeset: 11822:3f32b61fd611
user:      Sam Lantinga <slouken at libsdl.org>
date:      Wed Jan 10 10:42:40 2018 -0800
description:
Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer

diffstat:

 src/render/metal/SDL_render_metal.m |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (24 lines):

diff -r 43bba409e6d2 -r 3f32b61fd611 src/render/metal/SDL_render_metal.m
--- a/src/render/metal/SDL_render_metal.m	Sun Jan 07 22:00:37 2018 -0400
+++ b/src/render/metal/SDL_render_metal.m	Wed Jan 10 10:42:40 2018 -0800
@@ -653,14 +653,14 @@
 #if defined(__MACOSX__)
     maxtexsize = 16384;
 #elif defined(__TVOS__)
+    maxtexsize = 8192;
 #ifdef __TVOS_11_0
-    if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
-        maxtexsize = 16384;
-    } else
+    if (@available(tvOS 11.0, *)) {
+        if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
+            maxtexsize = 16384;
+        }
+    }
 #endif
-    {
-        maxtexsize = 8192;
-    }
 #else
 #ifdef __IPHONE_11_0
     if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]) {


More information about the commits mailing list