mirror of
https://github.com/glfw/glfw.git
synced 2025-04-16 10:16:00 +00:00
Merge c5e83f1b6a
into e7ea71be03
This commit is contained in:
commit
b3ec7e8d35
3 changed files with 20 additions and 5 deletions
|
@ -263,6 +263,7 @@ video tutorials.
|
|||
- Jared Tiala
|
||||
- Sergey Tikhomirov
|
||||
- Arthur Tombs
|
||||
- Luis Torres
|
||||
- TronicLabs
|
||||
- Ioannis Tsakpinis
|
||||
- Samuli Tuomola
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue