static const TCHAR *vertmode[] = { _T("horizontal"), _T("single"), _T("double"), _T("quadruple"), 0 };
#ifdef GFXFILTER
static const TCHAR *filtermode2[] = { _T("1x"), _T("2x"), _T("3x"), _T("4x"), 0 };
+static const TCHAR *filtermode2v[] = { _T("-"), _T("1x"), _T("2x"), _T("3x"), _T("4x"), 0 };
#endif
static const TCHAR *cartsmode[] = { _T("none"), _T("hrtmon"), 0 };
static const TCHAR *idemode[] = { _T("none"), _T("a600/a1200"), _T("a4000"), 0 };
}
}
}
- cfgfile_dwrite_str (f, _T("gfx_filter_mode"), ext, filtermode2[gf->gfx_filter_filtermode]);
+ cfgfile_dwrite_str(f, _T("gfx_filter_mode"), ext, filtermode2[gf->gfx_filter_filtermodeh]);
+ cfgfile_dwrite_str(f, _T("gfx_filter_mode2"), ext, filtermode2v[gf->gfx_filter_filtermodev]);
cfgfile_dwrite_ext (f, _T("gfx_filter_vert_zoomf"), ext, _T("%f"), gf->gfx_filter_vert_zoom);
cfgfile_dwrite_ext (f, _T("gfx_filter_horiz_zoomf"), ext, _T("%f"), gf->gfx_filter_horiz_zoom);
cfgfile_dwrite_ext (f, _T("gfx_filter_vert_zoom_multf"), ext, _T("%f"), gf->gfx_filter_vert_zoom_mult);
}
return 1;
}
- if (j == 0 && _tcscmp (option, _T("gfx_filter_mode")) == 0) {
- cfgfile_strval (option, value, _T("gfx_filter_mode"), &gf->gfx_filter_filtermode, filtermode2, 0);
+ if (j == 0 && _tcscmp(option, _T("gfx_filter_mode")) == 0) {
+ cfgfile_strval(option, value, _T("gfx_filter_mode"), &gf->gfx_filter_filtermodeh, filtermode2, 0);
return 1;
}
- if (j == 1 && _tcscmp (option, _T("gfx_filter_mode_rtg")) == 0) {
- cfgfile_strval (option, value, _T("gfx_filter_mode_rtg"), &gf->gfx_filter_filtermode, filtermode2, 0);
+ if (j == 1 && _tcscmp(option, _T("gfx_filter_mode_rtg")) == 0) {
+ cfgfile_strval(option, value, _T("gfx_filter_mode_rtg"), &gf->gfx_filter_filtermodeh, filtermode2, 0);
+ return 1;
+ }
+ if (j == 0 && _tcscmp(option, _T("gfx_filter_mode2")) == 0) {
+ cfgfile_strval(option, value, _T("gfx_filter_mode2"), &gf->gfx_filter_filtermodev, filtermode2v, 0);
+ return 1;
+ }
+ if (j == 1 && _tcscmp(option, _T("gfx_filter_mode2_rtg")) == 0) {
+ cfgfile_strval(option, value, _T("gfx_filter_mode2_rtg"), &gf->gfx_filter_filtermodev, filtermode2v, 0);
return 1;
}
f->gfx_filter_horiz_zoom_mult = 1.0;
f->gfx_filter_vert_zoom_mult = 1.0;
f->gfx_filter_bilinear = 0;
- f->gfx_filter_filtermode = 0;
+ f->gfx_filter_filtermodeh = 0;
+ f->gfx_filter_filtermodev = 0;
f->gfx_filter_keep_aspect = 0;
f->gfx_filter_autoscale = AUTOSCALE_STATIC_AUTO;
f->gfx_filter_keep_autoscale_aspect = false;
float gfx_filter_horiz_offset, gfx_filter_vert_offset;
int gfx_filter_left_border, gfx_filter_right_border;
int gfx_filter_top_border, gfx_filter_bottom_border;
- int gfx_filter_filtermode;
+ int gfx_filter_filtermodeh, gfx_filter_filtermodev;
int gfx_filter_bilinear;
int gfx_filter_noise, gfx_filter_blur;
int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast;
D3DXHANDLE m_InputDimsEffectHandle;
D3DXHANDLE m_TargetDimsEffectHandle;
D3DXHANDLE m_TexelSizeEffectHandle;
+ D3DXHANDLE m_ScaleEffectHandle;
D3DXHANDLE m_SourceTextureEffectHandle;
D3DXHANDLE m_WorkingTexture1EffectHandle;
D3DXHANDLE m_WorkingTexture2EffectHandle;
int ledwidth, ledheight;
int max_texture_w, max_texture_h;
int tin_w, tin_h, tout_w, tout_h, window_h, window_w;
- int t_depth, dmult, dmultx;
+ int t_depth, dmult, dmultxh, dmultxv;
int required_sl_texture_w, required_sl_texture_h;
int vsync2, guimode, maxscanline, variablerefresh;
int resetcount;
s->m_TargetDimsEffectHandle = hParam;
else if (strcmpi(ParamDesc.Semantic, "texelsize") == 0)
s->m_TexelSizeEffectHandle = hParam;
+ else if (strcmpi(ParamDesc.Semantic, "sourcescale") == 0)
+ s->m_ScaleEffectHandle = hParam;
} else if(ParamDesc.Class == D3DXPC_SCALAR && ParamDesc.Type == D3DXPT_FLOAT) {
if(strcmpi(ParamDesc.Semantic, "SCALING") == 0)
hr = effect->GetFloat(hParam, &d3d->m_scale);
return 0;
}
}
+ if (s->m_ScaleEffectHandle) {
+ D3DXVECTOR4 fScale;
+ fScale.x = 1 << currprefs.gfx_resolution;
+ fScale.y = 1 << currprefs.gfx_vresolution;
+ fScale.w = fScale.z = 1;
+ hr = s->pEffect->SetVector(s->m_ScaleEffectHandle, &fScale);
+ if (FAILED(hr)) {
+ write_log(_T("%s: SetTextures:SetVector:Scale %s\n"), D3DHEAD, D3D_ErrorString(hr));
+ return 0;
+ }
+ }
if (s->framecounterHandle)
s->pEffect->SetFloat(s->framecounterHandle, timeframes);
int zw, zh;
- if (ow > win_w * d3d->dmultx && oh > win_h * d3d->dmultx) {
+ if (ow > win_w * d3d->dmultxh && oh > win_h * d3d->dmultxv) {
zw = ow;
zh = oh;
} else {
- zw = win_w * d3d->dmultx;
- zh = win_h * d3d->dmultx;
+ zw = win_w * d3d->dmultxh;
+ zh = win_h * d3d->dmultxv;
}
for (int i = 0; i < MAX_SHADERS; i++) {
if (d3d->shaders[i].type == SHADERTYPE_BEFORE || d3d->shaders[i].type == SHADERTYPE_AFTER || d3d->shaders[i].type == SHADERTYPE_MIDDLE) {
return D3DADAPTER_DEFAULT;
}
-static const TCHAR *D3D_init2 (struct d3dstruct *d3d, HWND ahwnd, int w_w, int w_h, int depth, int *freq, int mmult)
+static const TCHAR *D3D_init2 (struct d3dstruct *d3d, HWND ahwnd, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv)
{
int monid = d3d - d3ddata;
struct amigadisplay *ad = &adisplays[monid];
write_log (_T("%s\n"), errmsg);
write_log (_T("%s: Retrying fullscreen with DirectDraw\n"), D3DHEAD);
if (ddraw_fs_hack_init (d3d)) {
- const TCHAR *err2 = D3D_init (ahwnd, monid, w_w, w_h, depth, freq, mmult);
+ const TCHAR *err2 = D3D_init (ahwnd, monid, w_w, w_h, depth, freq, mmulth, mmultv);
if (err2)
ddraw_fs_hack_free (d3d);
return err2;
if (d3d->d3d_ex && D3DEX) {
write_log (_T("%s\n"), errmsg);
D3DEX = 0;
- return D3D_init(ahwnd, monid, w_w, w_h, depth, freq, mmult);
+ return D3D_init(ahwnd, monid, w_w, w_h, depth, freq, mmulth, mmultv);
}
D3D_free(monid, true);
return errmsg;
if (!shaderon)
write_log (_T("Using non-shader version\n"));
- d3d->dmultx = mmult;
+ d3d->dmultxh = mmulth;
+ d3d->dmultxv = mmultv;
d3d->dmult = S2X_getmult(d3d - d3ddata);
d3d->window_w = w_w;
D3DHEAD, w_w, w_h, d3d->max_texture_w, d3d->max_texture_h);
return errmsg;
}
- while (d3d->dmultx > 1 && (w_w * d3d->dmultx > d3d->max_texture_w || w_h * d3d->dmultx > d3d->max_texture_h))
- d3d->dmultx--;
+ while (d3d->dmultxh > 1 && w_w * d3d->dmultxh > d3d->max_texture_w)
+ d3d->dmultxh--;
+ while (d3d->dmultxv > 1 && w_h * d3d->dmultxv > d3d->max_texture_h)
+ d3d->dmultxv--;
d3d->required_sl_texture_w = w_w;
d3d->required_sl_texture_h = w_h;
int w;
int h;
int depth;
- int mmult;
+ int mmulth, mmultv;
int *freq;
};
static struct d3d_initargs d3dargs;
D3D_free2 (d3d);
sleep_millis (1000);
write_log (_T("Threaded D3D_init() start (init)\n"));
- const TCHAR *t = D3D_init2 (d3d, d3dargs.hwnd, d3dargs.w, d3dargs.h,d3dargs.depth, d3dargs.freq, d3dargs.mmult);
+ const TCHAR *t = D3D_init2 (d3d, d3dargs.hwnd, d3dargs.w, d3dargs.h,d3dargs.depth, d3dargs.freq, d3dargs.mmulth, d3dargs.mmultv);
if (t) {
gui_message (_T("Threaded D3D_init() returned error '%s'\n"), t);
}
return NULL;
}
-static const TCHAR *xD3D_init (HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmult)
+static const TCHAR *xD3D_init (HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv)
{
struct d3dstruct *d3d = &d3ddata[monid];
if (!fakemodewaitms)
- return D3D_init2 (d3d, ahwnd, w_w, w_h, depth, freq, mmult);
+ return D3D_init2 (d3d, ahwnd, w_w, w_h, depth, freq, mmulth, mmultv);
d3d->fakemode = true;
d3dargs.hwnd = ahwnd;
d3dargs.w = w_w;
d3dargs.h = w_h;
d3dargs.depth = depth;
- d3dargs.mmult = mmult;
+ d3dargs.mmulth = mmulth;
+ d3dargs.mmultv = mmultv;
d3dargs.freq = freq;
uae_start_thread_fast (D3D_init_start, NULL, &d3d->fakemodetid);
return NULL;
d3d->tin_w = w * d3d->dmult;
d3d->tin_h = h * d3d->dmult;
- d3d->tout_w = d3d->tin_w * d3d->dmultx;
- d3d->tout_h = d3d->tin_h * d3d->dmultx;
+ d3d->tout_w = d3d->tin_w * d3d->dmultxh;
+ d3d->tout_h = d3d->tin_h * d3d->dmultxv;
if (d3d->fakemode)
return false;
};
extern void(*D3D_free)(int, bool immediate);
-extern const TCHAR* (*D3D_init)(HWND ahwnd, int, int w_w, int h_h, int depth, int *freq, int mmult);
+extern const TCHAR* (*D3D_init)(HWND ahwnd, int, int w_w, int h_h, int depth, int *freq, int mmulth, int mmultv);
extern bool(*D3D_alloctexture)(int, int, int);
extern void(*D3D_refresh)(int);
extern bool(*D3D_renderframe)(int, int,bool);
#include <Dwmapi.h>
void (*D3D_free)(int, bool immediate);
-const TCHAR* (*D3D_init)(HWND ahwnd, int, int w_w, int h_h, int depth, int *freq, int mmult);
+const TCHAR* (*D3D_init)(HWND ahwnd, int, int w_w, int h_h, int depth, int *freq, int mmulth, int mmultv);
bool (*D3D_alloctexture)(int, int, int);
void(*D3D_refresh)(int);
bool(*D3D_renderframe)(int, int,bool);
ID3DX11EffectVectorVariable *m_InputDimsEffectHandle;
ID3DX11EffectVectorVariable *m_TargetDimsEffectHandle;
ID3DX11EffectVectorVariable *m_TexelSizeEffectHandle;
+ ID3DX11EffectVectorVariable *m_ScaleEffectHandle;
// Texture Handles
ID3DX11EffectShaderResourceVariable *m_SourceTextureEffectHandle;
ID3DX11EffectShaderResourceVariable *m_WorkingTexture1EffectHandle;
DXGI_FORMAT texformat;
DXGI_FORMAT intformat;
bool m_tearingSupport;
- int dmult, dmultx;
+ int dmult, dmultxh, dmultxv;
int xoffset, yoffset;
float xmult, ymult;
DXGI_SWAP_CHAIN_DESC1 swapChainDesc;
s->m_TargetDimsEffectHandle = hParam->AsVector();
else if (strcmpi(ParamDesc.Semantic, "texelsize") == 0)
s->m_TexelSizeEffectHandle = hParam->AsVector();
+ else if (strcmpi(ParamDesc.Semantic, "sourcescale") == 0)
+ s->m_ScaleEffectHandle = hParam->AsVector();
if (strcmpi(ParamDesc.Semantic, "SCALING") == 0)
s->m_scale = hParam->AsScalar();
allocfxdata(d3d, s);
createfxvertices(d3d, s);
- s->viewport.Width = (float)d3d->m_screenWidth * d3d->dmultx;
- s->viewport.Height = (float)d3d->m_screenHeight * d3d->dmultx;
+ s->viewport.Width = (float)d3d->m_screenWidth * d3d->dmultxh;
+ s->viewport.Height = (float)d3d->m_screenHeight * d3d->dmultxv;
s->viewport.MinDepth = 0.0f;
s->viewport.MaxDepth = 1.0f;
s->viewport.TopLeftX = 0.0f;
if (s->m_TexelSizeEffectHandle) {
s->m_TexelSizeEffectHandle->SetFloatVector((float*)&fTexelSize);
}
+ if (s->m_ScaleEffectHandle) {
+ D3DXVECTOR4 fScale;
+ fScale.x = 1 << currprefs.gfx_resolution;
+ fScale.y = 1 << currprefs.gfx_vresolution;
+ fScale.w = fScale.z = 1;
+ s->m_ScaleEffectHandle->SetFloatVector((float*)&fScale);
+ }
if (s->framecounterHandle) {
s->framecounterHandle->SetFloat((float)timeframes);
}
int zw, zh;
- if (ow > win_w * d3d->dmultx && oh > win_h * d3d->dmultx) {
+ if (ow > win_w * d3d->dmultxh && oh > win_h * d3d->dmultxv) {
zw = ow;
zh = oh;
} else {
- zw = win_w * d3d->dmultx;
- zh = win_h * d3d->dmultx;
+ zw = win_w * d3d->dmultxh;
+ zh = win_h * d3d->dmultxv;
}
for (int i = 0; i < MAX_SHADERS; i++) {
struct shaderdata11 *s = &d3d->shaders[i];
return d3d->vblank;
}
-static int xxD3D11_init2(HWND ahwnd, int monid, int w_w, int w_h, int t_w, int t_h, int depth, int *freq, int mmult)
+static int xxD3D11_init2(HWND ahwnd, int monid, int w_w, int w_h, int t_w, int t_h, int depth, int *freq, int mmulth, int mmultv)
{
struct d3d11struct *d3d = &d3d11data[monid];
struct amigadisplay *ad = &adisplays[monid];
d3d->texformat = DXGI_FORMAT_B8G8R8A8_UNORM;
d3d->intformat = DXGI_FORMAT_B8G8R8A8_UNORM; // _SRGB;
d3d->scrformat = DXGI_FORMAT_B8G8R8A8_UNORM;
- d3d->dmultx = mmult;
+ d3d->dmultxh = mmulth;
+ d3d->dmultxv = mmultv;
struct MultiDisplay *md = getdisplay(&currprefs, monid);
POINT pt;
write_log(_T("D3D11 free end\n"));
}
-static int xxD3D11_init(HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmult)
+static int xxD3D11_init(HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv)
{
- return xxD3D11_init2(ahwnd, monid, w_w, w_h, w_w, w_h, depth, freq, mmult);
+ return xxD3D11_init2(ahwnd, monid, w_w, w_h, w_w, w_h, depth, freq, mmulth, mmultv);
}
-static const TCHAR *xD3D11_init(HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmult)
+static const TCHAR *xD3D11_init(HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv)
{
if (!can_D3D11(false))
return _T("D3D11 FAILED TO INIT");
- int v = xxD3D11_init(ahwnd, monid, w_w, w_h, depth, freq, mmult);
+ int v = xxD3D11_init(ahwnd, monid, w_w, w_h, depth, freq, mmulth, mmultv);
if (v > 0)
return NULL;
xD3D11_free(monid, true);
d3d->delayedfs = 0;
ShowWindow(d3d->ahwnd, SW_SHOWNORMAL);
int freq = 0;
- if (!xxD3D11_init2(d3d->ahwnd, d3d - d3d11data, d3d->m_screenWidth, d3d->m_screenHeight, d3d->m_bitmapWidth2, d3d->m_bitmapHeight2, 32, &freq, d3d->dmultx))
+ if (!xxD3D11_init2(d3d->ahwnd, d3d - d3d11data, d3d->m_screenWidth, d3d->m_screenHeight, d3d->m_bitmapWidth2, d3d->m_bitmapHeight2, 32, &freq, d3d->dmultxh, d3d->dmultxv))
d3d->invalidmode = true;
return false;
}
d3d->m_bitmapWidth2 = d3d->m_bitmapWidth;
d3d->m_bitmapHeight2 = d3d->m_bitmapHeight;
d3d->dmult = S2X_getmult(monid);
- d3d->m_bitmapWidthX = d3d->m_bitmapWidth * d3d->dmultx;
- d3d->m_bitmapHeightX = d3d->m_bitmapHeight * d3d->dmultx;
+ d3d->m_bitmapWidthX = d3d->m_bitmapWidth * d3d->dmultxh;
+ d3d->m_bitmapHeightX = d3d->m_bitmapHeight * d3d->dmultxv;
v = CreateTexture(d3d);
if (!v)
amiga_depth = vb->pixbytes * 8;
if (d3d) {
- int m = currprefs.gf[ad->picasso_on].gfx_filter_filtermode + 1;
- if (m < scale)
- m = scale;
- temp_width = dst_width * m;
- temp_height = dst_height * m;
+ int mh = currprefs.gf[ad->picasso_on].gfx_filter_filtermodeh + 1;
+ if (mh < scale)
+ mh = scale;
+ temp_width = dst_width * mh;
+ int mv = currprefs.gf[ad->picasso_on].gfx_filter_filtermodev + 1;
+ if (mv < scale)
+ mv = scale;
+ temp_height = dst_height * mv;
} else {
temp_width = dst_width * 2;
temp_height = dst_height * 2;
c |= gf->gfx_filter_horiz_zoom_mult != gfc->gfx_filter_horiz_zoom_mult ? (1) : 0;
c |= gf->gfx_filter_vert_zoom_mult != gfc->gfx_filter_vert_zoom_mult ? (1) : 0;
- c |= gf->gfx_filter_filtermode != gfc->gfx_filter_filtermode ? (2|8) : 0;
+ c |= gf->gfx_filter_filtermodeh != gfc->gfx_filter_filtermodeh ? (2 | 8) : 0;
+ c |= gf->gfx_filter_filtermodev != gfc->gfx_filter_filtermodev ? (2 | 8) : 0;
c |= gf->gfx_filter_bilinear != gfc->gfx_filter_bilinear ? (2|8|16) : 0;
c |= gf->gfx_filter_noise != gfc->gfx_filter_noise ? (1) : 0;
c |= gf->gfx_filter_blur != gfc->gfx_filter_blur ? (1) : 0;
S2X_free(mon->monitor_id);
oldtex_w = oldtex_h = -1;
if (mon->currentmode.flags & DM_D3D) {
- const TCHAR *err = D3D_init (mon->hAmigaWnd, mon->monitor_id, mon->currentmode.native_width, mon->currentmode.native_height, mon->currentmode.current_depth, &mon->currentmode.freq, mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermode + 1);
- if (err) {
+ int fmh = mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermodeh + 1;
+ int fmv = mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermodev + 1 - 1;
+ if (currprefs.gf[ad->picasso_on].gfx_filter_filtermodev == 0) {
+ fmv = fmh;
+ }
+ const TCHAR *err = D3D_init(mon->hAmigaWnd, mon->monitor_id, mon->currentmode.native_width, mon->currentmode.native_height,
+ mon->currentmode.current_depth, &mon->currentmode.freq, fmh, fmv);
+ if (err) {
if (currprefs.gfx_api == 2) {
D3D_free(0, true);
if (err[0] == 0 && currprefs.color_mode != 5) {
changed_prefs.gfx_api = currprefs.gfx_api = 1;
d3d_select(&currprefs);
error_log(_T("Direct3D11 failed to initialize ('%s'), falling back to Direct3D9."), err);
- err = D3D_init(mon->hAmigaWnd, mon->monitor_id, mon->currentmode.native_width, mon->currentmode.native_height, mon->currentmode.current_depth, &mon->currentmode.freq, mon->screen_is_picasso ? 1 : currprefs.gf[ad->picasso_on].gfx_filter_filtermode + 1);
+ err = D3D_init(mon->hAmigaWnd, mon->monitor_id, mon->currentmode.native_width, mon->currentmode.native_height,
+ mon->currentmode.current_depth, &mon->currentmode.freq, fmh, fmv);
}
if (err) {
D3D_free(0, true);
if (filter_nativertg)
v = FALSE;
- ew (hDlg, IDC_FILTERHZ, v);
- ew (hDlg, IDC_FILTERVZ, v);
- ew (hDlg, IDC_FILTERHZMULT, v && !as);
- ew (hDlg, IDC_FILTERVZMULT, v && !as);
- ew (hDlg, IDC_FILTERHO, v && !as);
- ew (hDlg, IDC_FILTERVO, v && !as);
- ew (hDlg, IDC_FILTERSLR, vv3);
- ew (hDlg, IDC_FILTERXL, vv2);
- ew (hDlg, IDC_FILTERXLV, vv2);
- ew (hDlg, IDC_FILTERXTRA, vv2);
- ew (hDlg, IDC_FILTERFILTER, workprefs.gfx_api);
- ew (hDlg, IDC_FILTERSTACK, workprefs.gfx_api);
- ew (hDlg, IDC_FILTERKEEPASPECT, v);
- ew (hDlg, IDC_FILTERASPECT, v);
- ew (hDlg, IDC_FILTERASPECT2, v && workprefs.gf[filter_nativertg].gfx_filter_keep_aspect);
- ew (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_NORMAL ||
+ ew(hDlg, IDC_FILTERHZ, v);
+ ew(hDlg, IDC_FILTERVZ, v);
+ ew(hDlg, IDC_FILTERHZMULT, v && !as);
+ ew(hDlg, IDC_FILTERVZMULT, v && !as);
+ ew(hDlg, IDC_FILTERHO, v && !as);
+ ew(hDlg, IDC_FILTERVO, v && !as);
+ ew(hDlg, IDC_FILTERSLR, vv3);
+ ew(hDlg, IDC_FILTERXL, vv2);
+ ew(hDlg, IDC_FILTERXLV, vv2);
+ ew(hDlg, IDC_FILTERXTRA, vv2);
+ ew(hDlg, IDC_FILTERFILTERH, workprefs.gfx_api);
+ ew(hDlg, IDC_FILTERFILTERV, workprefs.gfx_api);
+ ew(hDlg, IDC_FILTERSTACK, workprefs.gfx_api);
+ ew(hDlg, IDC_FILTERKEEPASPECT, v);
+ ew(hDlg, IDC_FILTERASPECT, v);
+ ew(hDlg, IDC_FILTERASPECT2, v && workprefs.gf[filter_nativertg].gfx_filter_keep_aspect);
+ ew(hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_NORMAL ||
workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER_AUTOSCALE));
- ew (hDlg, IDC_FILTEROVERLAY, workprefs.gfx_api);
- ew (hDlg, IDC_FILTEROVERLAYTYPE, workprefs.gfx_api);
+ ew(hDlg, IDC_FILTEROVERLAY, workprefs.gfx_api);
+ ew(hDlg, IDC_FILTEROVERLAYTYPE, workprefs.gfx_api);
- ew (hDlg, IDC_FILTERPRESETSAVE, filterpreset_builtin < 0);
- ew (hDlg, IDC_FILTERPRESETLOAD, filterpreset_selected > 0);
- ew (hDlg, IDC_FILTERPRESETDELETE, filterpreset_selected > 0 && filterpreset_builtin < 0);
+ ew(hDlg, IDC_FILTERPRESETSAVE, filterpreset_builtin < 0);
+ ew(hDlg, IDC_FILTERPRESETLOAD, filterpreset_selected > 0);
+ ew(hDlg, IDC_FILTERPRESETDELETE, filterpreset_selected > 0 && filterpreset_builtin < 0);
- ew (hDlg, IDC_FILTERINTEGER, workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER ||
+ ew(hDlg, IDC_FILTERINTEGER, workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER ||
workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER_AUTOSCALE);
}
-1
};
static void *filtervars[] = {
- &workprefs.gf[0].gfx_filter, &workprefs.gf[0].gfx_filter_filtermode,
+ &workprefs.gf[0].gfx_filter, &workprefs.gf[0].gfx_filter_filtermodeh,
&workprefs.gf[0].gfx_filter_vert_zoom, &workprefs.gf[0].gfx_filter_horiz_zoom,
&workprefs.gf[0].gfx_filter_vert_zoom_mult, &workprefs.gf[0].gfx_filter_horiz_zoom_mult,
&workprefs.gf[0].gfx_filter_vert_offset, &workprefs.gf[0].gfx_filter_horiz_offset,
NULL
};
static void *filtervars2[] = {
- NULL, &currprefs.gf[0].gfx_filter_filtermode,
+ NULL, &currprefs.gf[0].gfx_filter_filtermodeh,
&currprefs.gf[0].gfx_filter_vert_zoom, &currprefs.gf[0].gfx_filter_horiz_zoom,
&currprefs.gf[0].gfx_filter_vert_zoom_mult, &currprefs.gf[0].gfx_filter_horiz_zoom_mult,
&currprefs.gf[0].gfx_filter_vert_offset, &currprefs.gf[0].gfx_filter_horiz_offset,
filter_extra[fxidx] = NULL;
}
int filtermodenum = 0;
- SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERH, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERV, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERV, CB_ADDSTRING, 0, (LPARAM)_T("-"));
if (workprefs.gfx_api) {
for (i = 0; i < 4; i++) {
TCHAR tmp[100];
_stprintf (tmp, _T("%dx"), i + 1);
- SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_ADDSTRING, 0, (LPARAM)tmp);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERH, CB_ADDSTRING, 0, (LPARAM)tmp);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERV, CB_ADDSTRING, 0, (LPARAM)tmp);
filtermodenum++;
}
}
SetDlgItemInt (hDlg, IDC_FILTERXLV, *(filter_selected->varw[filter_nativertg]), TRUE);
}
}
- if (workprefs.gf[filter_nativertg].gfx_filter_filtermode >= filtermodenum)
- workprefs.gf[filter_nativertg].gfx_filter_filtermode = 0;
- SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_filtermode, 0);
+ if (workprefs.gf[filter_nativertg].gfx_filter_filtermodeh >= filtermodenum)
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodeh = 0;
+ if (workprefs.gf[filter_nativertg].gfx_filter_filtermodev >= filtermodenum + 1)
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodev = 0;
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERH, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_filtermodeh, 0);
+ SendDlgItemMessage(hDlg, IDC_FILTERFILTERV, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_filtermodev, 0);
setfiltermult (hDlg);
SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_RESETCONTENT, 0, 0L);
if (item != CB_ERR) {
TCHAR tmp[MAX_DPATH], oldsh[MAX_DPATH];
int of = workprefs.gf[filter_nativertg].gfx_filter;
- int off = workprefs.gf[filter_nativertg].gfx_filter_filtermode;
+ int offh = workprefs.gf[filter_nativertg].gfx_filter_filtermodeh;
+ int offv = workprefs.gf[filter_nativertg].gfx_filter_filtermodev;
tmp[0] = 0;
_tcscpy (oldsh, workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos]);
SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_GETLBTEXT, (WPARAM)item, (LPARAM)tmp);
workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos][0] = 0;
workprefs.gf[filter_nativertg].gfx_filter = 0;
- workprefs.gf[filter_nativertg].gfx_filter_filtermode = 0;
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodeh = 0;
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodev = 0;
if (workprefs.gfx_api) {
- LRESULT item2 = SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_GETCURSEL, 0, 0L);
+ LRESULT item2 = SendDlgItemMessage(hDlg, IDC_FILTERFILTERH, CB_GETCURSEL, 0, 0L);
if (item2 != CB_ERR)
- workprefs.gf[filter_nativertg].gfx_filter_filtermode = (int)item2;
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodeh = (int)item2;
+ item2 = SendDlgItemMessage(hDlg, IDC_FILTERFILTERV, CB_GETCURSEL, 0, 0L);
+ if (item2 != CB_ERR)
+ workprefs.gf[filter_nativertg].gfx_filter_filtermodev = (int)item2;
}
if (item > 0) {
if (item > UAE_FILTER_LAST) {
item--;
workprefs.gf[filter_nativertg].gfx_filter = uaefilters[item].type;
}
- if (of != workprefs.gf[filter_nativertg].gfx_filter || off != workprefs.gf[filter_nativertg].gfx_filter_filtermode) {
+ if (of != workprefs.gf[filter_nativertg].gfx_filter ||
+ offh != workprefs.gf[filter_nativertg].gfx_filter_filtermodeh ||
+ offv != workprefs.gf[filter_nativertg].gfx_filter_filtermodev) {
values_to_hw3ddlg (hDlg, false);
hw3d_changed = 1;
}
}
break;
case IDC_FILTERMODE:
- case IDC_FILTERFILTER:
+ case IDC_FILTERFILTERH:
+ case IDC_FILTERFILTERV:
case IDC_FILTEROVERLAY:
filter_handle (hDlg);
values_to_hw3ddlg (hDlg, false);