]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix vertical centering in low latency mode.
authorToni Wilen <twilen@winuae.net>
Sat, 14 Apr 2018 07:31:06 +0000 (10:31 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 14 Apr 2018 07:31:06 +0000 (10:31 +0300)
drawing.cpp

index 37a4ae9ca07776357a5da45fdd6b39c0cbcfcf16..3fba5c67f6657258a191442f355c5966d76da034 100644 (file)
@@ -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);