This commit is contained in:
Luis G. Torres 2025-02-28 15:37:28 -06:00 committed by GitHub
commit b3ec7e8d35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 5 deletions

View file

@ -263,6 +263,7 @@ video tutorials.
- Jared Tiala
- Sergey Tikhomirov
- Arthur Tombs
- Luis Torres
- TronicLabs
- Ioannis Tsakpinis
- Samuli Tuomola

View file

@ -126,6 +126,8 @@ information on what to include when reporting a bug.
- Updated minimum CMake version to 3.16 (#2541)
- [Cocoa] Added `QuartzCore` framework as link-time dependency
- [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506)
- [Cocoa] Bugfix: glfwGetFramebufferSize() now returns correct values for
non-retina windows for some Macs. (#2478)
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed
- [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
- [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault

View file

@ -1133,13 +1133,25 @@ void _glfwGetFramebufferSizeCocoa(_GLFWwindow* window, int* width, int* height)
@autoreleasepool {
const NSRect contentRect = [window->ns.view frame];
const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
if (width)
*width = (int) fbRect.size.width;
if (height)
*height = (int) fbRect.size.height;
if (window->ns.scaleFramebuffer)
{
const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
if (width)
*width = (int) fbRect.size.width;
if (height)
*height = (int) fbRect.size.height;
}
else
{
if (width)
*width = (int) contentRect.size.width;
if (height)
*height = (int) contentRect.size.height;
}
} // autoreleasepool
}