Skip to content
Permalink
Browse files

gsdx-gui: Properly grey out opencl device text when opencl is enabled…

…, also some minor cleanup.
  • Loading branch information...
lightningterror committed Mar 12, 2019
1 parent 3296ade commit e9e75805826ccaf3f16c7e556fe8de9ff0e1a63a
Showing with 8 additions and 9 deletions.
  1. +2 −4 plugins/GSdx/PSX/GPUSettingsDlg.cpp
  2. +6 −5 plugins/GSdx/Window/GSSettingsDlg.cpp
@@ -105,14 +105,12 @@ void GPUSettingsDlg::UpdateControls()

bool dx11 = renderer == GPURendererType::D3D11_SW;
bool null = renderer == GPURendererType::NULL_Renderer;
bool resscalenotsupported = true;

EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION), !resscalenotsupported);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION_TEXT), !resscalenotsupported);

ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_NULL), null ? SW_SHOW : SW_HIDE);

EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION), false);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION_TEXT), false);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER), dx11);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER_TEXT), dx11);
EnableWindow(GetDlgItem(m_hWnd, IDC_DITHERING), dx11);
@@ -348,25 +348,24 @@ void GSSettingsDlg::UpdateControls()
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_NULL), null ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGOGL), ogl ? SW_SHOW : SW_HIDE);

#ifndef ENABLE_OPENCL
ShowWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_OPENCL_TEXT), SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), SW_HIDE);
#endif
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_TEXT), ocl);
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), ocl);
EnableWindow(GetDlgItem(m_hWnd, IDC_INTERLACE), !null);
EnableWindow(GetDlgItem(m_hWnd, IDC_INTERLACE_TEXT), !null);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER), !null);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER_TEXT), !null);


ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT_TEXT), ogl ? SW_SHOW : SW_HIDE);

EnableWindow(GetDlgItem(m_hWnd, IDC_MIPMAP_HW), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_MIPMAP_HW_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_LARGE_FB), integer_scaling > 1 && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), ocl);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && !integer_scaling);
@@ -386,6 +385,8 @@ void GSSettingsDlg::UpdateControls()
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_DATE_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT_TEXT), ogl && hw);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT_TEXT), ogl ? SW_SHOW : SW_HIDE);

// Software mode settings
EnableWindow(GetDlgItem(m_hWnd, IDC_MIPMAP_SW), sw);

0 comments on commit e9e7580

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.