From 238ebb600d88159070cae239103ffbcf23770abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Freitas?= Date: Thu, 1 Sep 2016 00:23:22 +0100 Subject: [PATCH] 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. --- src/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index cad8715d..6b641585 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -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)]; }