From d16477617eb50ca687fa7b42829ab0338d555454 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 28 Mar 2020 16:27:21 +0900 Subject: [PATCH] devicescale: Bug fix: Wrong calculation to convert Y Updates #807 Fixes #1113 --- internal/devicescale/impl_mac.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/devicescale/impl_mac.go b/internal/devicescale/impl_mac.go index 89e1cee2a..a8a3817d7 100644 --- a/internal/devicescale/impl_mac.go +++ b/internal/devicescale/impl_mac.go @@ -25,7 +25,8 @@ package devicescale // // static float scaleAt(int x, int y) { // // On macOS, the direction of Y axis is inverted from GLFW monitors (#807). -// y = -y; +// // This is a reverse function of _glfwTransformYNS in GLFW (#1113). +// y = CGDisplayBounds(CGMainDisplayID()).size.height - y - 1; // // NSArray* screens = [NSScreen screens]; // for (NSScreen* screen in screens) {