Browse Source

metal: lowdpi on macOS uses nearest instead of linear upscaling.

Matches the behaviour of the OpenGL backend on macOS.
Alex Szpakowski 3 years ago
parent
commit
e4020e439a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/modules/graphics/metal/Graphics.mm

+ 5 - 0
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;