From 83e8018787badcfa66443b3f9f0a471f7d0a7216 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 19 Mar 2020 14:13:23 +0530 Subject: [PATCH] Exclude very small values for content scale --- kitty/glfw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/glfw.c b/kitty/glfw.c index 37cc1651d..6212af8c7 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -393,8 +393,8 @@ get_window_content_scale(GLFWwindow *w, float *xscale, float *yscale, double *xd if (monitor) glfwGetMonitorContentScale(monitor, xscale, yscale); } // check for zero, negative, NaN or excessive values of xscale/yscale - if (*xscale <= 0 || *xscale != *xscale || *xscale >= 24) *xscale = 1.0; - if (*yscale <= 0 || *yscale != *yscale || *yscale >= 24) *yscale = 1.0; + if (*xscale <= 0.0001 || *xscale != *xscale || *xscale >= 24) *xscale = 1.0; + if (*yscale <= 0.0001 || *yscale != *yscale || *yscale >= 24) *yscale = 1.0; #ifdef __APPLE__ const double factor = 72.0; #else