From: Toni Wilen Date: Fri, 2 Feb 2024 19:09:57 +0000 (+0200) Subject: Wait until last line is complete before finishing it. X-Git-Tag: 5200~30 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b91f83eb3c6ff32bd8b11e1a48698469f3a8807e;p=francis%2Fwinuae.git Wait until last line is complete before finishing it. --- diff --git a/custom.cpp b/custom.cpp index de96f401..d9d24fa5 100644 --- a/custom.cpp +++ b/custom.cpp @@ -14328,7 +14328,7 @@ static void hsync_handler(void) events_schedule(); } - if (vpos == maxvpos_display_vsync && !maxvpos_display_vsync_next) { + if (vpos == maxvpos_display_vsync + 1 && !maxvpos_display_vsync_next) { hsync_record_line_state_last(next_lineno, nextline_how, 0); inputdevice_read_msg(true); vsync_display_render(); @@ -14339,7 +14339,7 @@ static void hsync_handler(void) reset_autoscale(); display_vsync_counter++; maxvpos_display_vsync_next = true; - } else if (vpos != maxvpos_display_vsync && maxvpos_display_vsync_next) { + } else if (vpos != maxvpos_display_vsync + 1 && maxvpos_display_vsync_next) { // protect against weird VPOSW writes causing continuous vblanks maxvpos_display_vsync_next = false; }