Skip to content

Commit a61204b

Browse files
committed
Buildfixes
1 parent 39e17ff commit a61204b

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

config.def.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,13 @@
499499
#define DEFAULT_NOTCH_WRITE_OVER_ENABLE false
500500

501501
#ifdef __APPLE__
502-
#define DEFAULT_USE_METAL_ARG_BUFFERS (!!__builtin_available(macOS 12, iOS 13, tvOS 12, *))
502+
#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) || \
503+
(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || \
504+
(defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED >= 120000)
505+
#define DEFAULT_USE_METAL_ARG_BUFFERS true
506+
#else
507+
#define DEFAULT_USE_METAL_ARG_BUFFERS false
508+
#endif
503509
#endif
504510

505511
/* Enable use of shaders */

gfx/common/metal/metal_renderer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ - (bool)captureEnabled
640640

641641
- (bool)readBackBuffer:(uint8_t *)buffer
642642
{
643-
int x, y;
643+
size_t x, y;
644644
NSUInteger dstStride, srcStride;
645645
uint8_t const *src;
646646
uint8_t *dst, *tmp;

gfx/drivers/metal.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ - (void)drawWithContext:(Context *)ctx
17091709

17101710
- (void)_updateRenderTargets
17111711
{
1712-
int i;
1712+
size_t i;
17131713
NSUInteger width, height;
17141714
if (!_shader || !resize_render_targets)
17151715
return;
@@ -2109,7 +2109,7 @@ - (instancetype)initWithContext:(Context *)context
21092109

21102110
- (bool)loadImages:(const struct texture_image *)images count:(NSUInteger)count
21112111
{
2112-
int i;
2112+
size_t i;
21132113
[self _freeImages];
21142114

21152115
_images = [NSMutableArray arrayWithCapacity:count];

0 commit comments

Comments
 (0)