From e9e75805826ccaf3f16c7e556fe8de9ff0e1a63a Mon Sep 17 00:00:00 2001 From: lightningterror Date: Tue, 12 Mar 2019 01:49:48 +0100 Subject: [PATCH] gsdx-gui: Properly grey out opencl device text when opencl is enabled, also some minor cleanup. --- plugins/GSdx/PSX/GPUSettingsDlg.cpp | 6 ++---- plugins/GSdx/Window/GSSettingsDlg.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/GSdx/PSX/GPUSettingsDlg.cpp b/plugins/GSdx/PSX/GPUSettingsDlg.cpp index 4853be0292..12d516ec89 100644 --- a/plugins/GSdx/PSX/GPUSettingsDlg.cpp +++ b/plugins/GSdx/PSX/GPUSettingsDlg.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); diff --git a/plugins/GSdx/Window/GSSettingsDlg.cpp b/plugins/GSdx/Window/GSSettingsDlg.cpp index ef55a5e880..20ead2287d 100644 --- a/plugins/GSdx/Window/GSSettingsDlg.cpp +++ b/plugins/GSdx/Window/GSSettingsDlg.cpp @@ -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);