Skip to content

Commit

Permalink
GSdx: Adjust some checks in the gui code.
Browse files Browse the repository at this point in the history
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 4cf3328
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions plugins/GSdx/Window/GSSettingsDlg.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 4cf3328

Please sign in to comment.