From: Toni Wilen Date: Sat, 22 Jan 2022 14:20:32 +0000 (+0200) Subject: Integer scaling fix if horizontal and vertical had different size (for example lores... X-Git-Tag: 4910~14 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=6a6262342322665d1425b8273e414dd0afcc1dec;p=francis%2Fwinuae.git Integer scaling fix if horizontal and vertical had different size (for example lores and doubled) --- 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)