From c7a5045bd4d5c8877508cc233b4821c7627557a5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 25 Aug 2022 16:24:20 -0700 Subject: [PATCH] missed comment --- src/Window.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Window.zig b/src/Window.zig index 86d4e7e02..21fddb9f1 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -440,6 +440,8 @@ fn cursorPosToPixels(self: Window, pos: glfw.Window.CursorPos) glfw.Window.Curso const size = self.window.getSize() catch unreachable; const fb_size = self.window.getFramebufferSize() catch unreachable; + // If our framebuffer and screen are the same, then there is no scaling + // happening and we can short-circuit by returning the pos as-is. if (fb_size.width == size.width and fb_size.height == size.height) return pos;