Compare commits

...

2 Commits

Author SHA1 Message Date
nee-wom
c6756d34fc
Merge 168d72fc11 into 0d2d85d19c 2025-08-18 12:02:19 +00:00
nee-wom
168d72fc11 macOS EGL: fixed initial layer contents scale
The initial event viewDidChangeBackingProperties arrives
before the layer is attached to the view.
Hence the layer keeps its default scale, which is not
always correct.
2024-08-15 15:54:33 +02:00

View File

@ -942,6 +942,8 @@ GLFWbool _glfwCreateWindowCocoa(_GLFWwindow* window,
// need to get the layer for EGL window surface creation.
[window->ns.view setWantsLayer:YES];
window->ns.layer = [window->ns.view layer];
if (window->ns.scaleFramebuffer && window->ns.layer)
[window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
if (!_glfwInitEGL())
return GLFW_FALSE;