[mac][ios] Was: Silenced annoying deprecation warnings

pastk: removed silencing, left only minor style etc changes

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-08-01 12:41:51 +02:00
committed by Yannik Bloscheck
parent c4d5109d5b
commit 9d8e84ae5a
2 changed files with 67 additions and 68 deletions

View File

@@ -259,10 +259,9 @@ void MetalBaseContext::Clear(uint32_t clearBits, uint32_t storeBits)
void MetalBaseContext::SetViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h) void MetalBaseContext::SetViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{ {
id<MTLRenderCommandEncoder> encoder = GetCommandEncoder(); id<MTLRenderCommandEncoder> encoder = GetCommandEncoder();
[encoder setViewport:(MTLViewport){ static_cast<double>(x), static_cast<double>(y), [encoder setViewport:{static_cast<double>(x), static_cast<double>(y), static_cast<double>(w), static_cast<double>(h),
static_cast<double>(w), static_cast<double>(h),
0.0, 1.0}]; 0.0, 1.0}];
[encoder setScissorRect:(MTLScissorRect){ x, y, w, h }]; [encoder setScissorRect:{x, y, w, h}];
} }
void MetalBaseContext::SetScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h) void MetalBaseContext::SetScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
@@ -277,7 +276,7 @@ void MetalBaseContext::SetScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h
if (x + w > rpWidth) w = rpWidth - x; if (x + w > rpWidth) w = rpWidth - x;
if (y + h > rpHeight) h = rpHeight - y; if (y + h > rpHeight) h = rpHeight - y;
[encoder setScissorRect:(MTLScissorRect){ x, y, w, h }]; [encoder setScissorRect:{x, y, w, h}];
} }
} }