From: Toni Wilen Date: Sat, 25 Mar 2023 16:29:26 +0000 (+0200) Subject: Fix last visible line calculation X-Git-Tag: 5.0.0~105 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=0fbb3439bb22a2cfb7bf666fc188c4a7664e5508;p=francis%2Fwinuae.git Fix last visible line calculation --- diff --git a/custom.cpp b/custom.cpp index 55ec4d57..7923727e 100644 --- a/custom.cpp +++ b/custom.cpp @@ -5,7 +5,7 @@ * * Copyright 1995-2002 Bernd Schmidt * Copyright 1995 Alessandro Bissacco -* Copyright 2000-2021 Toni Wilen +* Copyright 2000-2023 Toni Wilen */ #include "sysconfig.h" @@ -7236,7 +7236,7 @@ static void init_hz(bool checkvposw) } } - if (maxvpos_display_vsync < 0) { + if (maxvpos_display_vsync <= 0) { maxvpos_display_vsync = 0; } @@ -7260,9 +7260,6 @@ static void init_hz(bool checkvposw) if (maxvpos_display_vsync >= vsstrt + 3) { maxvpos_display_vsync = vsstrt + 3; } - if (maxvpos_display_vsync < 0) { - maxvpos_display_vsync = 0; - } if (minfirstline < vsync_startline) { minfirstline = vsync_startline; } @@ -7299,11 +7296,15 @@ static void init_hz(bool checkvposw) if (firstblankedline < maxvpos / 2 && maxvpos_display_vsync > firstblankedline) { maxvpos_display_vsync = firstblankedline; } else if (firstblankedline <= maxvpos) { - maxvpos_display_vsync = 0; + maxvpos_display_vsync = 1; } } } + if (maxvpos_display_vsync <= 0) { + maxvpos_display_vsync = 1; + } + if (maxvpos_nom >= MAXVPOS) { maxvpos_nom = MAXVPOS; }