check_custom_limits();
}
-void store_custom_limits (int w, int h, int x, int y)
+void store_custom_limits(int w, int h, int x, int y)
{
stored_left_start = x;
stored_top_start = y;
#endif
}
-int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy, int *prealh)
+int get_custom_limits(int *pw, int *ph, int *pdx, int *pdy, int *prealh)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
int w, h, dx, dy, y1, y2, dbl1, dbl2;
int ret = 0;
if (!pw || !ph || !pdx || !pdy) {
- reset_custom_limits ();
+ reset_custom_limits();
return 0;
}
}
w = diwlast - diwfirst;
- dx = diwfirst - (hdisplay_left_border << (RES_MAX + 1));
+ dx = diwfirst - (hdisplay_left_border << (RES_MAX + 1)) + (1 << RES_MAX);
- w >>= (RES_MAX - currprefs.gfx_resolution);
- dx >>= (RES_MAX - currprefs.gfx_resolution);
+ w >>= (RES_MAX - hresolution);
+ dx >>= (RES_MAX - hresolution);
y2 = plflastline_total;
y1 = plffirstline_total;
+ if (exthblankon_ecs) {
+ y1--;
+ }
- if (minfirstline_linear > y1)
+ if (minfirstline_linear > y1) {
y1 = minfirstline_linear;
+ }
dbl2 = dbl1 = currprefs.gfx_vresolution;
if (doublescan > 0 && interlace_seen <= 0) {
if (ret < 0)
return 1;
h = currprefs.ntscmode ? 200 : 240;
- w = 320 << currprefs.gfx_resolution;
+ w = 320 << hresolution;
dy = 36 / 2;
dx = 58;
}
if (programmedmode != 1 && plffirstline_total < 30000) {
int th = (current_linear_vpos - minfirstline_linear) * 95 / 100;
if (th > h) {
- th = xshift (th, dbl1);
+ th = xshift(th, dbl1);
*prealh = th;
}
}
- dy = xshift (dy, dbl2);
- h = xshift (h, dbl1);
+ dy = xshift(dy, dbl2);
+ h = xshift(h, dbl1);
if (w == 0 || h == 0)
return 0;
*pdx = dx;
*pdy = dy;
#if 1
- write_log (_T("Display Size: %dx%d Offset: %dx%d\n"), w, h, dx, dy);
- write_log (_T("First: %d Last: %d Min: %d\n"),
+ write_log(_T("Display Size: %dx%d Offset: %dx%d\n"), w, h, dx, dy);
+ write_log(_T("First: %d Last: %d Min: %d\n"),
plffirstline_total, plflastline_total,
minfirstline);
#endif