mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
fixed crash during maximize/restore on cocoa
A crash will happen on cocoa systems if you do the following code: glfwSetWindowAspectRatio(w, GLFW_DONT_CARE, GLFW_DONT_CARE); glfwMaximizeWindow(w);
This commit is contained in:
parent
2e6a110181
commit
43a8fccada
@ -1155,7 +1155,7 @@ void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
|||||||
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
|
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
|
||||||
{
|
{
|
||||||
if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)
|
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
|
else
|
||||||
[window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)];
|
[window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user