From 0edfa88755add58faa7915b296e11cdb4da87460 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 20 Jul 2020 16:33:39 +0200 Subject: [PATCH] Reduce the difference of GLFW to upstream --- glfw/cocoa_monitor.m | 1 - glfw/cocoa_window.m | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/glfw/cocoa_monitor.m b/glfw/cocoa_monitor.m index 2203ffb0d..19193b73a 100644 --- a/glfw/cocoa_monitor.m +++ b/glfw/cocoa_monitor.m @@ -529,7 +529,6 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, *width = (int)frameRect.size.width; if (height) *height = (int)frameRect.size.height; - } GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 9fe453da6..02586c95d 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1595,10 +1595,10 @@ 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(numer, denom)]; - else + if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE) [window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)]; + else + [window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)]; } void _glfwPlatformSetWindowSizeIncrements(_GLFWwindow* window, int widthincr, int heightincr)