From: Toni Wilen Date: Sun, 14 May 2023 17:32:54 +0000 (+0300) Subject: Autoscale top/bottom off by one fix. X-Git-Tag: 5.0.0~41 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f1fb0f156883b78a187f4e8d3980f877ef41c0af;p=francis%2Fwinuae.git Autoscale top/bottom off by one fix. --- diff --git a/custom.cpp b/custom.cpp index daecaa9a..fb5a389c 100644 --- a/custom.cpp +++ b/custom.cpp @@ -12585,7 +12585,7 @@ static void hautoscale_check(void) last_planes_vpos = vpos; } if (vpos >= minfirstline && first_planes_vpos == 0) { - first_planes_vpos = vpos > minfirstline ? vpos - 1 : vpos; + first_planes_vpos = vpos; } else if (vpos >= current_maxvpos() - 1) { last_planes_vpos = current_maxvpos(); } diff --git a/drawing.cpp b/drawing.cpp index e3968aa9..007fcc89 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -906,7 +906,7 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy, int *prealh) dbl2--; } - h = y2 - y1; + h = y2 - y1 + 1; dy = y1 - minfirstline; if (first_planes_vpos == 0) {