iOS: fix build
authorAlex Szpakowski <slime73@gmail.com>
Mon, 01 Jan 2018 19:40:29 -0400
changeset 118023f5fad386f11
parent 11801 a42e37b036c0
child 11803 454f6dc9cb85
iOS: fix build
src/render/metal/SDL_render_metal.m
     1.1 --- a/src/render/metal/SDL_render_metal.m	Mon Jan 01 19:37:16 2018 -0400
     1.2 +++ b/src/render/metal/SDL_render_metal.m	Mon Jan 01 19:40:29 2018 -0400
     1.3 @@ -424,7 +424,7 @@
     1.4      data.mtlpipelineprims = MakePipelineCache(data, "SDL primitives pipeline ", SDL_METAL_VERTEX_SOLID, SDL_METAL_FRAGMENT_SOLID);
     1.5      data.mtlpipelinecopy = MakePipelineCache(data, "SDL texture pipeline ", SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_COPY);
     1.6  
     1.7 -    MTLSamplerDescriptor *samplerdesc = [[[MTLSamplerDescriptor alloc] init] autorelease];
     1.8 +    MTLSamplerDescriptor *samplerdesc = [[MTLSamplerDescriptor alloc] init];
     1.9  
    1.10      samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
    1.11      samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
    1.12 @@ -434,6 +434,10 @@
    1.13      samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
    1.14      data.mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
    1.15  
    1.16 +#if !__has_feature(objc_arc)
    1.17 +    [samplerdesc release];
    1.18 +#endif
    1.19 +
    1.20      static const float clearverts[] = { 0, 0,  0, 3,  3, 0 };
    1.21      data.mtlbufclearverts = [data.mtldevice newBufferWithBytes:clearverts length:sizeof(clearverts) options:MTLResourceCPUCacheModeWriteCombined];
    1.22      data.mtlbufclearverts.label = @"SDL_RenderClear vertices";