]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Force full refresh when display settings change, including custom.cpp unchanged lines.
authorToni Wilen <twilen@winuae.net>
Mon, 26 Oct 2015 16:44:16 +0000 (18:44 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 26 Oct 2015 16:44:16 +0000 (18:44 +0200)
custom.cpp
drawing.cpp
include/drawing.h

index e7a90dd90148b94b643dc2af0b483408f4b4cf87..8ea38dc8338837a4006d61b8237d36fab8f023b3 100644 (file)
@@ -3586,7 +3586,7 @@ static void finish_decisions (void)
        dip = curr_drawinfo + next_lineno;
        dip_old = prev_drawinfo + next_lineno;
        dp = line_decisions + next_lineno;
-       changed = thisline_changed;
+       changed = thisline_changed | custom_frame_redraw_necessary;
        if (thisline_decision.plfleft >= 0 && thisline_decision.nr_planes > 0)
                record_diw_line (thisline_decision.plfleft, diwfirstword, diwlastword);
 
index 29746ad2ad1c3c41b6c01c1ab3d94573d71e0052..28b90de3503bc6bfb36ef15dfdb7ef3ad9763b1e 100644 (file)
@@ -254,7 +254,8 @@ bool picasso_on;
 uae_sem_t gui_sem;
 int inhibit_frame;
 
-int framecnt = 0;
+int framecnt;
+int custom_frame_redraw_necessary;
 static int frame_redraw_necessary;
 static int picasso_redraw_necessary;
 
@@ -3035,8 +3036,11 @@ static void center_image (void)
        thisframe_y_adjust_real = thisframe_y_adjust << linedbl;
        max_ypos_thisframe = (maxvpos_display - minfirstline + 1) << linedbl;
 
-       if (prev_x_adjust != visible_left_border || prev_y_adjust != thisframe_y_adjust)
-               frame_redraw_necessary |= interlace_seen > 0 && linedbl ? 2 : 1;
+       if (prev_x_adjust != visible_left_border || prev_y_adjust != thisframe_y_adjust) {
+               int redraw = interlace_seen > 0 && linedbl ? 2 : 1;
+               if (redraw > frame_redraw_necessary)
+                       frame_redraw_necessary = redraw;
+       }
 
        max_diwstop = 0;
        min_diwstart = MAX_STOP;
@@ -3230,8 +3234,13 @@ static void init_drawing_frame (void)
        first_drawn_line = 32767;
 
        first_block_line = last_block_line = NO_BLOCK;
-       if (frame_redraw_necessary)
+       if (frame_redraw_necessary) {
+               reset_decision_table();
+               custom_frame_redraw_necessary = 1;
                frame_redraw_necessary--;
+       } else {
+               custom_frame_redraw_necessary = 0;
+       }
 
        center_image ();
 
@@ -3893,15 +3902,11 @@ void freevidbuffer (struct vidbuffer *buf)
 
 void reset_drawing (void)
 {
-       unsigned int i;
-
        max_diwstop = 0;
 
        lores_reset ();
 
-       for (i = 0; i < sizeof linestate / sizeof *linestate; i++) {
-               linestate[i] = LINE_UNDECIDED;
-       }
+       reset_decision_table();
 
        init_aspect_maps ();
 
index cd0a4eca1a4644afa1094b52df6fb200a75bfc76..a7863bc6b9b8a6d49464c15b54ee5d1259c4fc1b 100644 (file)
@@ -76,7 +76,7 @@ STATIC_INLINE int coord_window_to_diw_x (int x)
 }
 
 extern int framecnt;
-
+extern int custom_frame_redraw_necessary;
 
 /* color values in two formats: 12 (OCS/ECS) or 24 (AGA) bit Amiga RGB (color_regs),
 * and the native color value; both for each Amiga hardware color register.