From 6a6262342322665d1425b8273e414dd0afcc1dec Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 22 Jan 2022 16:20:32 +0200 Subject: [PATCH] Integer scaling fix if horizontal and vertical had different size (for example lores and doubled) --- od-win32/win32_scaler.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 82b2006a..cbe104aa 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -425,6 +425,20 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int filter_horiz_zoom_mult = 1.0; filter_vert_zoom_mult = 1.0; + if (currprefs.gfx_vresolution == VRES_NONDOUBLE) { + if (currprefs.gfx_resolution == RES_HIRES) { + maxw *= 2; + } else if (currprefs.gfx_resolution == RES_SUPERHIRES) { + maxw *= 4; + } + } else { + if (currprefs.gfx_resolution == RES_LORES) { + maxw /= 2; + } else if (currprefs.gfx_resolution == RES_SUPERHIRES) { + maxw *= 2; + } + } + double multadd = 1.0 / (1 << currprefs.gf[ad->picasso_on].gfx_filter_integerscalelimit); if (cw2 > maxw || ch2 > maxh) { while (cw2 / mult > maxw || ch2 / mult > maxh) -- 2.47.3