mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Exclude very small values for content scale
This commit is contained in:
parent
372d2008a6
commit
83e8018787
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue