From: Toni Wilen Date: Sat, 14 Apr 2018 07:31:06 +0000 (+0300) Subject: Fix vertical centering in low latency mode. X-Git-Tag: 4000~126 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4044b5a073909727d450de0397be3049d23726c4;p=francis%2Fwinuae.git Fix vertical centering in low latency mode. --- diff --git a/drawing.cpp b/drawing.cpp index 37a4ae9c..3fba5c67 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -3712,6 +3712,12 @@ void draw_lines(int end, int section) if (end < 0) return; end <<= linedbl; + if (min_ypos_for_screen > 0 && thisframe_y_adjust_real > 0) { + end += min_ypos_for_screen; + end -= thisframe_y_adjust_real; + if (end < 0) + return; + } vidinfo->outbuffer = vb; if (!lockscr(vb, false, vb->last_drawn_line ? false : true)) @@ -3722,12 +3728,15 @@ void draw_lines(int end, int section) int line = i + thisframe_y_adjust_real; int whereline = amiga2aspect_line_map[i1]; int wherenext = amiga2aspect_line_map[i1 + 1]; - if (whereline >= vb->inheight) + if (whereline >= vb->inheight) { + y_end = vb->inheight - 1; break; + } if (whereline < 0) continue; - if (y_start < 0) + if (y_start < 0) { y_start = whereline; + } hposblank = 0; pfield_draw_line(vb, line, whereline, wherenext);