From: Toni Wilen Date: Sat, 18 Dec 2021 17:53:49 +0000 (+0200) Subject: Do not enable hidden blanking when using filter modes that would hide blanked part. X-Git-Tag: 4910~41 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=11c31fed87296ccd95c813c3c600d29899ecd882;p=francis%2Fwinuae.git Do not enable hidden blanking when using filter modes that would hide blanked part. --- diff --git a/drawing.cpp b/drawing.cpp index cd3b6f61..430bae8c 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -684,7 +684,7 @@ void check_custom_limits(void) visible_bottom_stop = bottom; } -void set_custom_limits (int w, int h, int dx, int dy) +void set_custom_limits (int w, int h, int dx, int dy, bool blank) { struct gfx_filterdata *fd = &currprefs.gf[0]; int vls = visible_left_start; @@ -701,7 +701,7 @@ void set_custom_limits (int w, int h, int dx, int dy) dy = 0; } - if (specialmonitor_uses_control_lines()) { + if (specialmonitor_uses_control_lines() || !blank) { w = -1; h = -1; } @@ -721,8 +721,9 @@ void set_custom_limits (int w, int h, int dx, int dy) visible_bottom_stop = visible_top_start + h; } - if (vls != visible_left_start || vrs != visible_right_stop || - vts != visible_top_start || vbs != visible_bottom_stop) + if ((w >= 0 && h >= 0) && + (vls != visible_left_start || vrs != visible_right_stop || + vts != visible_top_start || vbs != visible_bottom_stop)) notice_screen_contents_lost(0); check_custom_limits(); diff --git a/include/drawing.h b/include/drawing.h index ed96815f..2c0d0ef8 100644 --- a/include/drawing.h +++ b/include/drawing.h @@ -366,7 +366,7 @@ extern void full_redraw_all(void); extern bool draw_frame (struct vidbuffer*); extern int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy, int *prealh); extern void store_custom_limits (int w, int h, int dx, int dy); -extern void set_custom_limits (int w, int h, int dx, int dy); +extern void set_custom_limits (int w, int h, int dx, int dy, bool blank); extern void check_custom_limits (void); extern void get_custom_topedge (int *x, int *y, bool max); extern void get_custom_raw_limits (int *pw, int *ph, int *pdx, int *pdy); diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index fe466afe..7105dc83 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -368,7 +368,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int ch -= 20 << currprefs.gfx_vresolution; } if (scalemode != AUTOSCALE_INTEGER && scalemode != AUTOSCALE_INTEGER_AUTOSCALE) { - set_custom_limits (cw, ch, cx, cy); + set_custom_limits (cw, ch, cx, cy, true); store_custom_limits (cw, ch, cx, cy); scl = true; } @@ -391,14 +391,14 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int if (scalemode == AUTOSCALE_INTEGER_AUTOSCALE) { ok = get_custom_limits (&cw, &ch, &cx, &cy, &crealh) != 0; if (ok) { - set_custom_limits(cw, ch, cx, cy); + set_custom_limits(cw, ch, cx, cy, true); store_custom_limits(cw, ch, cx, cy); scl = true; } } if (scalemode == AUTOSCALE_INTEGER || ok == false) { getmanualpos(monid, &cx, &cy, &cw, &ch); - set_custom_limits(cw, ch, cx, cy); + set_custom_limits(cw, ch, cx, cy, true); store_custom_limits(cw, ch, cx, cy); scl = true; } @@ -459,7 +459,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int //write_log (_T("%dx%d %dx%d\n"), cx, cy, currprefs.gfx_resolution, currprefs.gfx_vresolution); getmanualpos(monid, &cx, &cy, &cw, &ch); - set_custom_limits(cw, ch, cx, cy); + set_custom_limits(cw, ch, cx, cy, false); store_custom_limits(cw, ch, cx, cy); scl = true; @@ -478,7 +478,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int cv = get_custom_limits (&cw, &ch, &cx, &cy, &crealh); if (cv) { - set_custom_limits(cw, ch, cx, cy); + set_custom_limits(cw, ch, cx, cy, false); store_custom_limits(cw, ch, cx, cy); scl = true; } @@ -487,7 +487,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int cv = get_custom_limits (&cw, &ch, &cx, &cy, &crealh); if (cv) { - set_custom_limits (cw, ch, cx, cy); + set_custom_limits (cw, ch, cx, cy, true); store_custom_limits (cw, ch, cx, cy); scl = true; } @@ -495,7 +495,7 @@ void getfilterrect2(int monid, RECT *sr, RECT *dr, RECT *zr, int dst_width, int } if (!scl) { - set_custom_limits (0, 0, 0, 0); + set_custom_limits (0, 0, 0, 0, false); } if (!autoaspect_done) { diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 871c6db0..103c44a6 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -4353,7 +4353,7 @@ static void updatedisplayarea2(int monid) void updatedisplayarea(int monid) { - set_custom_limits(-1, -1, -1, -1); + set_custom_limits(-1, -1, -1, -1, false); if (monid >= 0) { updatedisplayarea2(monid); } else {