* src/w32term.c (x_get_scale_factor):
* src/xterm.c (x_get_scale_factor): Don't let the scale factors
become less than 1. Reported by Yuri D'Elia <wavexx@thregr.org> in
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00459.html.
if (dpyinfo)
{
- *scale_x = floor (dpyinfo->resx / base_res);
- *scale_y = floor (dpyinfo->resy / base_res);
+ if (dpyinfo->resx > base_res)
+ *scale_x = floor (dpyinfo->resx / base_res);
+ if (dpyinfo->resy > base_res)
+ *scale_y = floor (dpyinfo->resy / base_res);
}
}
if (dpyinfo)
{
- *scale_x = floor (dpyinfo->resx / base_res);
- *scale_y = floor (dpyinfo->resy / base_res);
+ if (dpyinfo->resx > base_res)
+ *scale_x = floor (dpyinfo->resx / base_res);
+ if (dpyinfo->resy > base_res)
+ *scale_y = floor (dpyinfo->resy / base_res);
}
}