mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Cocoa: Fix assert on disabling window aspect ratio
When disabling window aspect ratio, a system assert would trigger. The correct way to disable window aspect ratio is to set a resize increment. Closes #852.
This commit is contained in:
parent
a49601ba87
commit
238ebb600d
@ -1183,7 +1183,7 @@ void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
||||
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
|
||||
{
|
||||
if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)
|
||||
[window->ns.object setContentAspectRatio:NSMakeSize(0, 0)];
|
||||
[window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)];
|
||||
else
|
||||
[window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user