From e4020e439a900f9705c1049a025880cecfccb565 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 23 Jan 2022 12:55:06 -0400 Subject: [PATCH] metal: lowdpi on macOS uses nearest instead of linear upscaling. Matches the behaviour of the OpenGL backend on macOS. --- src/modules/graphics/metal/Graphics.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 36cb9b8f8..af512f222 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -479,6 +479,11 @@ bool Graphics::setMode(void *context, int width, int height, int pixelwidth, int // This is set to NO when there are pending screen captures. metalLayer.framebufferOnly = YES; +#ifdef LOVE_MACOS + // Matches behaviour of SDL's OpenGL context when using the GL renderer. + metalLayer.magnificationFilter = kCAFilterNearest; +#endif + setViewportSize(width, height, pixelwidth, pixelheight); created = true;