From: Toni Wilen Date: Mon, 26 Oct 2015 16:44:16 +0000 (+0200) Subject: Force full refresh when display settings change, including custom.cpp unchanged lines. X-Git-Tag: 3200~16 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=294a21959ce718cf6f98ead67f945f33c61a026a;p=francis%2Fwinuae.git Force full refresh when display settings change, including custom.cpp unchanged lines. --- diff --git a/custom.cpp b/custom.cpp index e7a90dd9..8ea38dc8 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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); diff --git a/drawing.cpp b/drawing.cpp index 29746ad2..28b90de3 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -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 (); diff --git a/include/drawing.h b/include/drawing.h index cd0a4eca..a7863bc6 100644 --- a/include/drawing.h +++ b/include/drawing.h @@ -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.