From: Toni Wilen Date: Sun, 1 Aug 2021 17:40:39 +0000 (+0300) Subject: Do not set custom limits twice. X-Git-Tag: 4900~101 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=201b522883e037e3ff033f1103e2357b373585d9;p=francis%2Fwinuae.git Do not set custom limits twice. --- diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 55328ebc..7acc7ac7 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -367,9 +367,11 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int cw -= 40 << currprefs.gfx_resolution; ch -= 20 << currprefs.gfx_vresolution; } - set_custom_limits (cw, ch, cx, cy); - store_custom_limits (cw, ch, cx, cy); - scl = true; + if (scalemode != AUTOSCALE_INTEGER && scalemode != AUTOSCALE_INTEGER_AUTOSCALE) { + set_custom_limits (cw, ch, cx, cy); + store_custom_limits (cw, ch, cx, cy); + scl = true; + } } if (scalemode == AUTOSCALE_INTEGER || scalemode == AUTOSCALE_INTEGER_AUTOSCALE) { @@ -391,12 +393,14 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int if (ok) { set_custom_limits(cw, ch, cx, cy); store_custom_limits(cw, ch, cx, cy); + scl = true; } } if (scalemode == AUTOSCALE_INTEGER || ok == false) { getmanualpos(monid, &cx, &cy, &cw, &ch); set_custom_limits(cw, ch, cx, cy); store_custom_limits(cw, ch, cx, cy); + scl = true; } #if 0