missed comment

This commit is contained in:
Mitchell Hashimoto
2022-08-25 16:24:20 -07:00
parent 84b75967a2
commit c7a5045bd4

View File

@ -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;