mirror of https://github.com/PCSX2/pcsx2.git
GSDX-UI: Remove Trilinear options at some cases
Currently the Trilinear option only works on OpenGL. Remove it from combobox when other renderers are used.
This commit is contained in:
parent
45be4626f6
commit
8945ace3f7
|
@ -188,9 +188,33 @@ void GSSettingsDlg::OnInit()
|
||||||
AddTooltip(IDC_LOGZ);
|
AddTooltip(IDC_LOGZ);
|
||||||
AddTooltip(IDC_LARGE_FB);
|
AddTooltip(IDC_LARGE_FB);
|
||||||
|
|
||||||
|
UpdateFilteringCombobox();
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GSSettingsDlg::UpdateFilteringCombobox()
|
||||||
|
{
|
||||||
|
INT_PTR i;
|
||||||
|
ComboBoxGetSelData(IDC_RENDERER, i);
|
||||||
|
bool opengl = static_cast<GSRendererType>(i) == GSRendererType::OGL_HW;
|
||||||
|
bool hw_mode = opengl || static_cast<GSRendererType>(i) == GSRendererType::DX1011_HW || static_cast<GSRendererType>(i) == GSRendererType::DX9_HW;
|
||||||
|
if (!hw_mode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint8 filter = (ComboBoxGetSelData(IDC_FILTER, i)) ? static_cast<uint8>(i) : static_cast<uint8>(theApp.GetConfigI("filter"));
|
||||||
|
if (!opengl) //Currently Trilinear is only exclusive to OpenGL, remove those combobox items when any other renderer is used
|
||||||
|
{
|
||||||
|
auto head = theApp.m_gs_filter.begin();
|
||||||
|
auto tail = head + static_cast<uint8>(Filtering::Trilinear);
|
||||||
|
vector<GSSetting> list(head, tail);
|
||||||
|
ComboBoxInit(IDC_FILTER, list, std::max(uint8(Filtering::Nearest), std::min(filter, uint8(Filtering::Bilinear_PS2))));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ComboBoxInit(IDC_FILTER, theApp.m_gs_filter, filter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
|
@ -203,6 +227,12 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_RENDERER:
|
case IDC_RENDERER:
|
||||||
|
if (code == CBN_SELCHANGE)
|
||||||
|
{
|
||||||
|
UpdateFilteringCombobox();
|
||||||
|
UpdateControls();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case IDC_UPSCALE_MULTIPLIER:
|
case IDC_UPSCALE_MULTIPLIER:
|
||||||
case IDC_FILTER:
|
case IDC_FILTER:
|
||||||
if (code == CBN_SELCHANGE)
|
if (code == CBN_SELCHANGE)
|
||||||
|
|
|
@ -82,6 +82,7 @@ class GSSettingsDlg : public GSDialog
|
||||||
|
|
||||||
void UpdateRenderers();
|
void UpdateRenderers();
|
||||||
void UpdateControls();
|
void UpdateControls();
|
||||||
|
void UpdateFilteringCombobox();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnInit();
|
void OnInit();
|
||||||
|
|
Loading…
Reference in New Issue