]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not enable hidden blanking when using filter modes that would hide blanked part.
authorToni Wilen <twilen@winuae.net>
Sat, 18 Dec 2021 17:53:49 +0000 (19:53 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 18 Dec 2021 17:53:49 +0000 (19:53 +0200)
drawing.cpp
include/drawing.h
od-win32/win32_scaler.cpp
od-win32/win32gfx.cpp

index cd3b6f616195e1a61d2d97c4caacf4cbc8c4cf9a..430bae8c0256b95afc45e4aac80fc64536b45be5 100644 (file)
@@ -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();
index ed96815f245f0934cd6307bda2f29b7808e9a840..2c0d0ef8795c4de2292bb8521448c020ebfbde75 100644 (file)
@@ -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);
index fe466afe4482bf032d3e49e117515c6556fe8758..7105dc83e03dd4e63ee42ab53c9714b9dde9ad4c 100644 (file)
@@ -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) {
index 871c6db04c91019d8264de0d81dbaf042212512b..103c44a6f524761561b357c6e2491e4d86953ba0 100644 (file)
@@ -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 {