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;
dy = 0;
}
- if (specialmonitor_uses_control_lines()) {
+ if (specialmonitor_uses_control_lines() || !blank) {
w = -1;
h = -1;
}
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();
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);
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;
}
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;
}
//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;
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;
}
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;
}
}
if (!scl) {
- set_custom_limits (0, 0, 0, 0);
+ set_custom_limits (0, 0, 0, 0, false);
}
if (!autoaspect_done) {