Permalink
Browse files

GSdx: Adjust some checks in the gui code.

Now that d3d9 has been removed we can ease up and reduce/remove some
render variable checks.
  • Loading branch information...
lightningterror committed Jan 2, 2019
1 parent 549b438 commit 4cf332868232fe6b46a2e6fddfcf675afb49a3a4
Showing with 4 additions and 7 deletions.
  1. +4 −7 plugins/GSdx/Window/GSSettingsDlg.cpp
@@ -296,14 +296,12 @@ void GSSettingsDlg::UpdateAdapters()
return;

const GSRendererType renderer = static_cast<GSRendererType>(data);
const bool ogl = renderer == GSRendererType::OGL_HW || renderer == GSRendererType::OGL_SW || renderer == GSRendererType::OGL_OpenCL;
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::DX1011_OpenCL;
const bool null = renderer == GSRendererType::Null;

EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER), !(ogl || null));
EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER_TEXT), !(ogl || null));
EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER), dx11);
EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER_TEXT), dx11);

if (ogl || null)
if (!dx11)
{
SendMessage(GetDlgItem(m_hWnd, IDC_ADAPTER), CB_RESETCONTENT, 0, 0);
return;
@@ -614,7 +612,6 @@ void GSHacksDlg::OnInit()
unsigned short upscaling_multiplier = static_cast<unsigned short>(SendMessage(hwnd_upscaling, CB_GETITEMDATA, SendMessage(hwnd_upscaling, CB_GETCURSEL, 0, 0), 0));

// It can only be accessed with a HW renderer, so this is sufficient.
bool dx11 = renderer == GSRendererType::DX1011_HW;
bool ogl = renderer == GSRendererType::OGL_HW;
bool native = upscaling_multiplier == 1;
bool msaadisabled = true;
@@ -666,7 +663,7 @@ void GSHacksDlg::OnInit()

// Direct3D-only hacks:
EnableWindow(GetDlgItem(m_hWnd, IDC_ALPHASTENCIL), !ogl);
EnableWindow(GetDlgItem(m_hWnd, IDC_ALPHAHACK), dx11);
EnableWindow(GetDlgItem(m_hWnd, IDC_ALPHAHACK), !ogl);
EnableWindow(GetDlgItem(m_hWnd, IDC_MSAACB), !msaadisabled);
EnableWindow(GetDlgItem(m_hWnd, IDC_MSAA_TEXT), !msaadisabled);

0 comments on commit 4cf3328

Please sign in to comment.