static const TCHAR *joyportsubmodes_lightpen[] = { _T(""), _T("trojan"), 0 };
static const TCHAR *joyaf[] = { _T("none"), _T("normal"), _T("toggle"), _T("always"), _T("togglebutton"), 0 };
static const TCHAR *epsonprinter[] = { _T("none"), _T("ascii"), _T("epson_matrix_9pin"), _T("epson_matrix_24pin"), _T("epson_matrix_48pin"), 0 };
-static const TCHAR *aspects[] = { _T("none"), _T("vga"), _T("tv"), 0 };
+static const TCHAR *aspects[] = { _T("none"), _T("vga"), _T("tv"), _T("tv_pal"), _T("tv_ntsc"), 0};
static const TCHAR *vsyncmodes[] = { _T("false"), _T("true"), _T("autoswitch"), 0 };
static const TCHAR *vsyncmodes2[] = { _T("normal"), _T("busywait"), 0 };
static const TCHAR *filterapi[] = { _T("directdraw"), _T("direct3d"), _T("direct3d11"), _T("direct3d11"), 0};
cfgfile_dwrite_bool(f, _T("gfx_filter_bilinear"), ext, gf->gfx_filter_bilinear != 0);
cfgfile_dwrite_ext(f, _T("gfx_filter_keep_autoscale_aspect"), ext, _T("%d"), gf->gfx_filter_keep_autoscale_aspect);
- cfgfile_dwrite_strarr(f, _T("gfx_filter_keep_aspect"), ext, aspects, gf->gfx_filter_keep_aspect);
+ cfgfile_dwrite_strarr(f, _T("gfx_filter_keep_aspect"), ext, aspects, gf->gfx_filter_aspect_type);
cfgfile_dwrite_strarr(f, _T("gfx_filter_autoscale"), ext, j != GF_RTG ? autoscale : autoscale_rtg, gf->gfx_filter_autoscale);
cfgfile_dwrite_strarr(f, _T("gfx_filter_autoscale_limit"), ext, autoscalelimit, gf->gfx_filter_integerscalelimit);
cfgfile_dwrite_ext(f, _T("gfx_filter_aspect_ratio"), ext, _T("%d:%d"),
struct gfx_filterdata *gf = &p->gf[j];
const TCHAR *ext = j == 0 ? NULL : (j == 1 ? _T("_rtg") : _T("_lace"));
if (cfgfile_strval (option, value, _T("gfx_filter_autoscale"), ext, &gf->gfx_filter_autoscale, j != GF_RTG ? autoscale : autoscale_rtg, 0)
- || cfgfile_strval (option, value, _T("gfx_filter_keep_aspect"), ext, &gf->gfx_filter_keep_aspect, aspects, 0)
- || cfgfile_strval (option, value, _T("gfx_filter_autoscale_limit"), ext, &gf->gfx_filter_integerscalelimit, autoscalelimit, 0)
+ || cfgfile_strval(option, value, _T("gfx_filter_keep_aspect"), ext, &gf->gfx_filter_aspect_type, aspects, 0)
+ || cfgfile_strval(option, value, _T("gfx_filter_autoscale_limit"), ext, &gf->gfx_filter_integerscalelimit, autoscalelimit, 0)
|| cfgfile_floatval(option, value, _T("gfx_filter_vert_zoomf"), ext, &gf->gfx_filter_vert_zoom)
|| cfgfile_floatval(option, value, _T("gfx_filter_horiz_zoomf"), ext, &gf->gfx_filter_horiz_zoom)
|| cfgfile_floatval(option, value, _T("gfx_filter_vert_zoom_multf"), ext, &gf->gfx_filter_vert_zoom_mult)
f->gfx_filter_bilinear = 0;
f->gfx_filter_filtermodeh = 0;
f->gfx_filter_filtermodev = 0;
- f->gfx_filter_keep_aspect = 0;
+ f->gfx_filter_aspect_type = 0;
f->gfx_filter_autoscale = AUTOSCALE_STATIC_AUTO;
f->gfx_filter_keep_autoscale_aspect = false;
f->gfx_filteroverlay_overscan = 0;
#define MAX_LUA_STATES 16
+#define ASPECT_TYPE_NONE 0
+#define ASPECT_TYPE_VGA 1
+#define ASPECT_TYPE_TV_AUTO 2
+#define ASPECT_TYPE_TV_PAL 3
+#define ASPECT_TYPE_TV_NTSC 4
#define MAX_FILTERDATA 3
#define GF_NORMAL 0
int gfx_filter_noise, gfx_filter_blur;
int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast;
int gfx_filter_gamma, gfx_filter_gamma_ch[3];
- int gfx_filter_keep_aspect, gfx_filter_aspect;
+ int gfx_filter_aspect_type, gfx_filter_aspect;
int gfx_filter_autoscale;
int gfx_filter_integerscalelimit;
int gfx_filter_keep_autoscale_aspect;
COMBOBOX IDC_FILTERASPECT,14,187,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
CONTROL "Keep autoscale aspect",IDC_FILTERKEEPAUTOSCALEASPECT,
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,205,126,11
- CONTROL "Keep aspect ratio",IDC_FILTERKEEPASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,218,126,11
+ CONTROL "Pixel aspect ratio adjustment",IDC_FILTERKEEPASPECT,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,231,126,11
COMBOBOX IDC_FILTERASPECT2,14,244,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Extra Settings",-1,154,173,240,89
COMBOBOX IDC_FILTERXTRA,177,193,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Save",IDC_FILTERPRESETSAVE,265,280,55,14
PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,325,280,55,14
CONTROL "Always stretch NTSC mode [] NTSC modes are strecthed to match PAL mode",IDC_SCALENTSC,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,231,125,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,219,125,10
END
IDD_HARDDRIVE DIALOGEX 0, 0, 397, 208
if (keepaspect) {
p->gf[0].gfx_filter_aspect = ntsc_extended ? 0 : -1;
p->gf[0].gfx_filter_keep_autoscale_aspect = ntsc_extended || fs ? 0 : 1;
- p->gf[0].gfx_filter_keep_aspect = 0;
+ p->gf[0].gfx_filter_aspect_type = 0;
} else {
p->gf[0].gfx_filter_aspect = 0;
p->gf[0].gfx_filter_keep_autoscale_aspect = 0;
- p->gf[0].gfx_filter_keep_aspect = 0;
+ p->gf[0].gfx_filter_aspect_type = 0;
}
p->gf[0].gfx_filter_horiz_zoom_mult = hmult;
p->gf[0].gfx_filter_horiz_zoom_mult, p->gf[0].gfx_filter_vert_zoom_mult,
p->gfx_xcenter_pos, p->gfx_ycenter_pos,
p->gfx_xcenter_size, p->gfx_ycenter_size,
- p->gf[0].gfx_filter_autoscale, p->gf[0].gfx_filter_aspect, p->gf[0].gfx_filter_keep_aspect,
+ p->gf[0].gfx_filter_autoscale, p->gf[0].gfx_filter_aspect, p->gf[0].gfx_filter_aspect_type,
gfx_height_original, p->gfx_ntscpixels);
}
}
p->gf[0].gfx_filter_horiz_zoom_mult, p->gf[0].gfx_filter_vert_zoom_mult,
p->gfx_xcenter_pos, p->gfx_ycenter_pos,
p->gfx_xcenter_size, p->gfx_ycenter_size,
- p->gf[0].gfx_filter_autoscale, p->gf[0].gfx_filter_aspect, p->gf[0].gfx_filter_keep_aspect);
+ p->gf[0].gfx_filter_autoscale, p->gf[0].gfx_filter_aspect, p->gf[0].gfx_filter_aspect_type);
write_log (_T("AFTER W=%d (%d) H=%d (%d)\n"), gm->gfx_size.width, currprefs.gfx_size.width, gm->gfx_size.height, currprefs.gfx_size.height);
#endif
}
#define AUTORESIZE_FRAME_DELAY 4
static float filteroffsetx, filteroffsety, filterxmult = 1.0, filterymult = 1.0;
+static const float palpar = 944.0f / 908.0f;
+static const float ntscpar = 780.0f / 910.0f;
+static const float palntscmult = (3546895.0f / 3579545.0f);
void getfilteroffset(int monid, float *dx, float *dy, float *mx, float *my)
{
return false;
}
-static float getpalntscratio(float dstratio, int keep_aspect, int palntscadjust)
+static float getpalntscratio(float dstratio, int aspect_type, int palntscadjust)
{
int lh = 0;
bool isp = ispal(&lh);
float palntscratio = dstratio;
if (lh > 1) {
- float palh = (313 - 25) * 2 + 1.0f;
- float ntsch = (263 - 20) * 2 + 1.0f;
- float ll = lh * 2 + 1.0f;
- if (abs(lh - (263 - 20)) <= 22) {
- ll = ntsch;
- }
- if (abs(lh - (313 - 25)) <= 22) {
- ll = palh;
- }
if (currprefs.ntscmode) {
- if (palntscadjust && !isp) {
- palntscratio = palntscratio * palh / ll;
- }
- if (keep_aspect == 2 && isp) {
- palntscratio = palntscratio * 0.93f;
- } else if (keep_aspect == 1 && !isp) {
- palntscratio = palntscratio * 0.98f;
+ if (palntscadjust) {
+ if (!isp) {
+ palntscratio = palntscratio / ntscpar;
+ }
+ } else {
+ if ((aspect_type == ASPECT_TYPE_TV_AUTO && !isp) || aspect_type == ASPECT_TYPE_TV_NTSC) {
+ palntscratio = palntscratio / ntscpar;
+ } else if (aspect_type == ASPECT_TYPE_TV_PAL) {
+ palntscratio = palntscratio / palpar / palntscmult;
+ } else if (aspect_type == ASPECT_TYPE_VGA && !isp) {
+ palntscratio = palntscratio * 0.98f;
+ }
}
} else {
- if (palntscadjust && !isp) {
- palntscratio = palntscratio * palh / ll;
- }
- if (keep_aspect == 2 && isp) {
- palntscratio = palntscratio * 0.95f;
- } else if (keep_aspect == 1 && !isp) {
- palntscratio = palntscratio * 0.95f;
+ if (palntscadjust) {
+ if (!isp) {
+ palntscratio = palntscratio / ntscpar * palntscmult;
+ }
+ } else {
+ if ((aspect_type == ASPECT_TYPE_TV_AUTO && isp) || aspect_type == ASPECT_TYPE_TV_PAL) {
+ palntscratio = palntscratio / palpar;
+ } else if (aspect_type == ASPECT_TYPE_TV_NTSC) {
+ palntscratio = palntscratio / ntscpar * palntscmult;
+ } else if (aspect_type == ASPECT_TYPE_VGA && !isp) {
+ palntscratio = palntscratio * 0.95f;
+ }
}
}
}
return palntscratio;
}
-static bool get_aspect(int monid, float *dstratiop, float *srcratiop, float *xmultp, float *ymultp, bool doautoaspect, float autoaspectratio, int keep_aspect, int filter_aspect)
+static bool get_aspect(int monid, float *dstratiop, float *srcratiop, float *xmultp, float *ymultp, bool doautoaspect, float autoaspectratio, int aspect_type, int filter_aspect)
{
struct amigadisplay *ad = &adisplays[monid];
bool aspect = false;
*xmultp = 1.0;
*ymultp = 1.0;
- if (keep_aspect || filter_aspect != 0) {
+ if (aspect_type || filter_aspect != 0) {
- if (keep_aspect) {
+ if (aspect_type) {
if (isvga()) {
- if (keep_aspect == 1)
+ if (aspect_type == ASPECT_TYPE_VGA) {
dstratio = dstratio * 0.93f;
+ }
} else {
bool isp = ispal(NULL);
if (currprefs.ntscmode) {
- if (keep_aspect == 2 && !isp)
- dstratio = dstratio * 0.93f;
- else if (keep_aspect == 1 && isp)
+ if ((aspect_type == ASPECT_TYPE_TV_AUTO && !isp) || aspect_type == ASPECT_TYPE_TV_NTSC) {
+ dstratio = dstratio / ntscpar;
+ } else if (aspect_type == ASPECT_TYPE_TV_PAL) {
+ dstratio = dstratio / palpar / palntscmult;
+ } else if (aspect_type == ASPECT_TYPE_VGA && isp) {
dstratio = dstratio * 0.98f;
+ }
} else {
- if (keep_aspect == 2 && isp)
- dstratio = dstratio * 0.95f;
- else if (keep_aspect == 1 && !isp)
+ if ((aspect_type == ASPECT_TYPE_TV_AUTO && isp) || aspect_type == ASPECT_TYPE_TV_PAL) {
+ dstratio = dstratio / palpar;
+ } else if (aspect_type == ASPECT_TYPE_TV_NTSC) {
+ dstratio = dstratio / ntscpar * palntscmult;
+ } else if (aspect_type == ASPECT_TYPE_VGA && !isp) {
dstratio = dstratio * 0.95f;
+ }
}
}
}
bool doautoaspect = false;
float autoaspectratio;
int idx = ad->gf_index;
- int keep_aspect = currprefs.gf[idx].gfx_filter_keep_aspect;
+ int aspect_type = currprefs.gf[idx].gfx_filter_aspect_type;
int filter_aspect = currprefs.gf[idx].gfx_filter_aspect;
int palntscadjust = currprefs.gfx_ntscpixels;
int autoselect = 0;
if (!specialmode && scalemode == AUTOSCALE_STATIC_AUTO) {
filter_aspect = 0;
- keep_aspect = 0;
+ aspect_type = 0;
if (ds->dstwidth >= 640 && ds->dstwidth <= 800 && ds->dstheight >= 480 && ds->dstheight <= 600) {
int hres = currprefs.gfx_resolution + doublescan2x;
autoselect = 1;
doautoaspect = get_auto_aspect_ratio(cw, ch, crealh, scalemode, &autoaspectratio);
autoaspect_done = true;
- if (get_aspect(&dstratio, &srcratio, &xmult, &ymult, doautoaspect, autoaspectratio, keep_aspect, filter_aspect)) {
+ if (get_aspect(&dstratio, &srcratio, &xmult, &ymult, doautoaspect, autoaspectratio, aspect_type, filter_aspect)) {
cw += cw - cw * xmult;
ch += ch - ch * ymult;
}
float scalex = currprefs.gf[idx].gfx_filter_horiz_zoom_mult > 0 ? currprefs.gf[idx].gfx_filter_horiz_zoom_mult : 1.0f;
float scaley = currprefs.gf[idx].gfx_filter_vert_zoom_mult > 0 ? currprefs.gf[idx].gfx_filter_vert_zoom_mult : 1.0f;
- float palntscratio = getpalntscratio(dstratio, keep_aspect, palntscadjust);
+ float palntscratio = getpalntscratio(dstratio, aspect_type, palntscadjust);
scaley = scaley * palntscratio / dstratio;
if (doublescan2x > 0) {
diffy = ds->outheight;
}
- if (get_aspect(monid, &dstratio, &srcratio, &xmult, &ymult, doautoaspect, autoaspectratio, keep_aspect, filter_aspect)) {
+ if (get_aspect(monid, &dstratio, &srcratio, &xmult, &ymult, doautoaspect, autoaspectratio, aspect_type, filter_aspect)) {
diff = diffx - (int)(diffx * xmult);
sizeoffset(ds, diff, 0);
filteroffsetx += -diff / 2;
sizeoffset(ds, extraw, extrah);
- if (keep_aspect) {
+ if (aspect_type) {
float xm, ym, m;
xm = (float)aws / ds->dstwidth;
}
{
- float palntscratio = getpalntscratio(dstratio, keep_aspect, palntscadjust);
+ float palntscratio = getpalntscratio(dstratio, aspect_type, palntscadjust);
ymult = ymult * palntscratio / dstratio;
}
c |= gf->gfx_filter_aspect != gfc->gfx_filter_aspect ? (1) : 0;
c |= gf->gfx_filter_rotation != gfc->gfx_filter_rotation ? (1) : 0;
- c |= gf->gfx_filter_keep_aspect != gfc->gfx_filter_keep_aspect ? (1) : 0;
+ c |= gf->gfx_filter_aspect_type != gfc->gfx_filter_aspect_type ? (1) : 0;
c |= gf->gfx_filter_keep_autoscale_aspect != gfc->gfx_filter_keep_autoscale_aspect ? (1) : 0;
c |= gf->gfx_filter_luminance != gfc->gfx_filter_luminance ? (1) : 0;
c |= gf->gfx_filter_contrast != gfc->gfx_filter_contrast ? (1) : 0;
ew(hDlg, IDC_FILTERFILTERH, TRUE);
ew(hDlg, IDC_FILTERFILTERV, TRUE);
ew(hDlg, IDC_FILTERSTACK, workprefs.gfx_api);
- ew(hDlg, IDC_FILTERKEEPASPECT, v && scalemode != AUTOSCALE_STATIC_AUTO);
- ew(hDlg, IDC_FILTERASPECT, v && scalemode != AUTOSCALE_STATIC_AUTO);
- ew(hDlg, IDC_FILTERASPECT2, v && workprefs.gf[filter_nativertg].gfx_filter_keep_aspect && scalemode != AUTOSCALE_STATIC_AUTO);
+ ew(hDlg, IDC_FILTERKEEPASPECT, v && scalemode != AUTOSCALE_STATIC_AUTO && !workprefs.gfx_ntscpixels);
+ ew(hDlg, IDC_FILTERASPECT, v && scalemode != AUTOSCALE_STATIC_AUTO && !workprefs.gfx_ntscpixels);
+ ew(hDlg, IDC_FILTERASPECT2, v && workprefs.gf[filter_nativertg].gfx_filter_aspect_type && scalemode != AUTOSCALE_STATIC_AUTO && !workprefs.gfx_ntscpixels);
ew(hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, scalemode == AUTOSCALE_NORMAL || scalemode == AUTOSCALE_INTEGER_AUTOSCALE);
ew(hDlg, IDC_FILTEROVERLAY, workprefs.gfx_api);
ew(hDlg, IDC_FILTEROVERLAYTYPE, workprefs.gfx_api);
&workprefs.gfx_xcenter, &workprefs.gfx_ycenter,
&workprefs.gf[0].gfx_filter_luminance, &workprefs.gf[0].gfx_filter_contrast, &workprefs.gf[0].gfx_filter_saturation,
&workprefs.gf[0].gfx_filter_gamma, &workprefs.gf[0].gfx_filter_blur, &workprefs.gf[0].gfx_filter_noise,
- &workprefs.gf[0].gfx_filter_keep_aspect, &workprefs.gf[0].gfx_filter_aspect,
+ &workprefs.gf[0].gfx_filter_aspect_type, &workprefs.gf[0].gfx_filter_aspect,
&workprefs.gf[0].gfx_filter_autoscale, &workprefs.gf[0].gfx_filter_bilinear,
&workprefs.gf[0].gfx_filter_keep_autoscale_aspect,
&workprefs.gf[0].gfx_filter_integerscalelimit,
&currprefs.gfx_xcenter, &currprefs.gfx_ycenter,
&currprefs.gf[0].gfx_filter_luminance, &currprefs.gf[0].gfx_filter_contrast, &currprefs.gf[0].gfx_filter_saturation,
&currprefs.gf[0].gfx_filter_gamma, &currprefs.gf[0].gfx_filter_blur, &currprefs.gf[0].gfx_filter_noise,
- &currprefs.gf[0].gfx_filter_keep_aspect, &currprefs.gf[0].gfx_filter_aspect,
+ &currprefs.gf[0].gfx_filter_aspect_type, &currprefs.gf[0].gfx_filter_aspect,
&currprefs.gf[0].gfx_filter_autoscale, &currprefs.gf[0].gfx_filter_bilinear,
&currprefs.gf[0].gfx_filter_keep_autoscale_aspect,
&currprefs.gf[0].gfx_filter_integerscalelimit,
(workprefs.gf[filter_nativertg].gfx_filter_aspect < 0) ? 1 :
getaspectratioindex (workprefs.gf[filter_nativertg].gfx_filter_aspect) + 2, 0);
- CheckDlgButton(hDlg, IDC_FILTERKEEPASPECT, workprefs.gf[filter_nativertg].gfx_filter_keep_aspect);
+ CheckDlgButton(hDlg, IDC_FILTERKEEPASPECT, workprefs.gf[filter_nativertg].gfx_filter_aspect_type);
CheckDlgButton(hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, workprefs.gf[filter_nativertg].gfx_filter_keep_autoscale_aspect != 0);
CheckDlgButton(hDlg, IDC_SCALENTSC, workprefs.gfx_ntscpixels);
xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_SETCURSEL,
- workprefs.gf[filter_nativertg].gfx_filter_keep_aspect, 0);
+ workprefs.gf[filter_nativertg].gfx_filter_aspect_type, 0);
xSendDlgItemMessage (hDlg, IDC_FILTERINTEGER, CB_RESETCONTENT, 0, 0L);
xSendDlgItemMessage (hDlg, IDC_FILTERINTEGER, CB_ADDSTRING, 0, (LPARAM)_T("1/1"));
xSendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)tmp);
addaspectratios (hDlg, IDC_FILTERASPECT);
- xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_RESETCONTENT, 0, 0);
- WIN32GUI_LoadUIString (IDS_DISABLED, tmp, sizeof tmp / sizeof (TCHAR));
- xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)tmp);
- xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("VGA"));
- xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("TV"));
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_RESETCONTENT, 0, 0);
+ WIN32GUI_LoadUIString(IDS_DISABLED, tmp, sizeof tmp / sizeof (TCHAR));
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)tmp);
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("VGA"));
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("TV (Auto)"));
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("TV (PAL)"));
+ xSendDlgItemMessage(hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("TV (NTSC)"));
xSendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_RESETCONTENT, 0, 0L);
WIN32GUI_LoadUIString (IDS_SCREEN_NATIVE, tmp, sizeof tmp / sizeof (TCHAR));
case IDC_FILTERKEEPASPECT:
{
if (ischecked (hDlg, IDC_FILTERKEEPASPECT))
- currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = 1;
+ currprefs.gf[filter_nativertg].gfx_filter_aspect_type = workprefs.gf[filter_nativertg].gfx_filter_aspect_type = 1;
else
- currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = 0;
+ currprefs.gf[filter_nativertg].gfx_filter_aspect_type = workprefs.gf[filter_nativertg].gfx_filter_aspect_type = 0;
enable_for_hw3ddlg (hDlg);
values_to_hw3ddlg (hDlg, false);
updatedisplayarea(-1);
if (getdlgnumber(hz, &val, -99, 99)) {
fd->gfx_filter_horiz_zoom = (float)val;
xSendDlgItemMessage(hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, val);
- if (fdwp->gfx_filter_keep_aspect) {
+ if (fdwp->gfx_filter_aspect_type) {
fd->gfx_filter_vert_zoom = currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom;
xSendDlgItemMessage(hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, (int)fdwp->gfx_filter_vert_zoom);
}
if (getdlgnumber(vz, &val, -99, 99)) {
fd->gfx_filter_vert_zoom = (float)val;
xSendDlgItemMessage(hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, val);
- if (fdwp->gfx_filter_keep_aspect) {
+ if (fdwp->gfx_filter_aspect_type) {
fd->gfx_filter_horiz_zoom = currprefs.gf[filter_nativertg].gfx_filter_vert_zoom;
xSendDlgItemMessage(hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, (int)fdwp->gfx_filter_horiz_zoom);
}
{
int v = xSendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_GETCURSEL, 0, 0L);
if (v != CB_ERR)
- currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = v;
+ currprefs.gf[filter_nativertg].gfx_filter_aspect_type = workprefs.gf[filter_nativertg].gfx_filter_aspect_type = v;
updatedisplayarea(-1);
}
break;
} else {
if (h == hz) {
fd->gfx_filter_horiz_zoom = (float)SendMessage (hz, TBM_GETPOS, 0, 0);
- if (fdwp->gfx_filter_keep_aspect) {
+ if (fdwp->gfx_filter_aspect_type) {
fd->gfx_filter_vert_zoom = currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom;
xSendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, (int)fdwp->gfx_filter_vert_zoom);
}
} else if (h == vz) {
fd->gfx_filter_vert_zoom = (float)SendMessage (vz, TBM_GETPOS, 0, 0);
- if (fdwp->gfx_filter_keep_aspect) {
+ if (fdwp->gfx_filter_aspect_type) {
fd->gfx_filter_horiz_zoom = currprefs.gf[filter_nativertg].gfx_filter_vert_zoom;
xSendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, (int)fdwp->gfx_filter_horiz_zoom);
}