From b91f83eb3c6ff32bd8b11e1a48698469f3a8807e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 2 Feb 2024 21:09:57 +0200 Subject: [PATCH] Wait until last line is complete before finishing it. --- custom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.3