Skip to content
Snippets Groups Projects
Commit 28849150 authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Cocoa: Set CAMetalLayer contents scale from window

Fixes #1229.
parent 5f8108e8
No related branches found
No related tags found
No related merge requests found
......@@ -582,6 +582,9 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
window->ns.xscale = xscale;
window->ns.yscale = yscale;
_glfwInputWindowContentScale(window, xscale, yscale);
if (window->ns.layer)
[window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
}
}
......@@ -1871,6 +1874,7 @@ VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
return VK_ERROR_EXTENSION_NOT_PRESENT;
}
[window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
[window->ns.view setWantsLayer:YES];
memset(&sci, 0, sizeof(sci));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment