diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 6 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/w32term.c b/src/w32term.c index 6d2fa335859..2785ae2b52d 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -318,8 +318,10 @@ x_get_scale_factor(struct w32_display_info *dpyinfo, int *scale_x, int *scale_y) | |||
| 318 | 318 | ||
| 319 | if (dpyinfo) | 319 | if (dpyinfo) |
| 320 | { | 320 | { |
| 321 | *scale_x = floor (dpyinfo->resx / base_res); | 321 | if (dpyinfo->resx > base_res) |
| 322 | *scale_y = floor (dpyinfo->resy / base_res); | 322 | *scale_x = floor (dpyinfo->resx / base_res); |
| 323 | if (dpyinfo->resy > base_res) | ||
| 324 | *scale_y = floor (dpyinfo->resy / base_res); | ||
| 323 | } | 325 | } |
| 324 | } | 326 | } |
| 325 | 327 | ||
diff --git a/src/xterm.c b/src/xterm.c index 2efa70b1dca..77daa22ae0d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3483,8 +3483,10 @@ x_get_scale_factor(Display *disp, int *scale_x, int *scale_y) | |||
| 3483 | 3483 | ||
| 3484 | if (dpyinfo) | 3484 | if (dpyinfo) |
| 3485 | { | 3485 | { |
| 3486 | *scale_x = floor (dpyinfo->resx / base_res); | 3486 | if (dpyinfo->resx > base_res) |
| 3487 | *scale_y = floor (dpyinfo->resy / base_res); | 3487 | *scale_x = floor (dpyinfo->resx / base_res); |
| 3488 | if (dpyinfo->resy > base_res) | ||
| 3489 | *scale_y = floor (dpyinfo->resy / base_res); | ||
| 3488 | } | 3490 | } |
| 3489 | } | 3491 | } |
| 3490 | 3492 | ||