Hide OpenCL GUI option for non-OpenCL builds.
From now on if you create a GUI option specific to a particular build, do not gray it out. Instead do as I have done here and make it not present on those builds. It may add a few precompiler conditionals that developers have to look at, but that is considerably better than a completely useless option that the end user has to look at. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5774 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5cf491af64
commit
e706ccc5d0
|
@ -64,7 +64,9 @@ EVT_CHOICE(ID_FRAMELIMIT, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_FRAMELIMIT_USEFPSFORLIMITING, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_FRAMELIMIT_USEFPSFORLIMITING, CConfigMain::CoreSettingsChanged)
|
||||||
|
|
||||||
EVT_CHECKBOX(ID_ALWAYS_HLE_BS2, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_ALWAYS_HLE_BS2, CConfigMain::CoreSettingsChanged)
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
EVT_CHECKBOX(ID_ENABLE_OPENCL, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_OPENCL, CConfigMain::CoreSettingsChanged)
|
||||||
|
#endif
|
||||||
EVT_RADIOBOX(ID_CPUENGINE, CConfigMain::CoreSettingsChanged)
|
EVT_RADIOBOX(ID_CPUENGINE, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_LOCKTHREADS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_LOCKTHREADS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::CoreSettingsChanged)
|
||||||
|
@ -161,7 +163,9 @@ void CConfigMain::UpdateGUI()
|
||||||
EnableCheats->Disable();
|
EnableCheats->Disable();
|
||||||
|
|
||||||
AlwaysHLE_BS2->Disable();
|
AlwaysHLE_BS2->Disable();
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
EnableOpenCL->Disable();
|
EnableOpenCL->Disable();
|
||||||
|
#endif
|
||||||
CPUEngine->Disable();
|
CPUEngine->Disable();
|
||||||
LockThreads->Disable();
|
LockThreads->Disable();
|
||||||
DSPThread->Disable();
|
DSPThread->Disable();
|
||||||
|
@ -265,7 +269,9 @@ void CConfigMain::InitializeGUIValues()
|
||||||
|
|
||||||
// General - Advanced
|
// General - Advanced
|
||||||
AlwaysHLE_BS2->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2);
|
AlwaysHLE_BS2->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2);
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
EnableOpenCL->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableOpenCL);
|
EnableOpenCL->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableOpenCL);
|
||||||
|
#endif
|
||||||
CPUEngine->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore);
|
CPUEngine->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore);
|
||||||
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
|
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
|
||||||
DSPThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread);
|
DSPThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread);
|
||||||
|
@ -333,8 +339,9 @@ void CConfigMain::InitializeGUITooltips()
|
||||||
|
|
||||||
// General - Advanced
|
// General - Advanced
|
||||||
DSPThread->SetToolTip(wxT("Run DSPLLE on a dedicated thread (not recommended)."));
|
DSPThread->SetToolTip(wxT("Run DSPLLE on a dedicated thread (not recommended)."));
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
EnableOpenCL->SetToolTip(wxT("Allow videocard to accelerate texture decoding."));
|
EnableOpenCL->SetToolTip(wxT("Allow videocard to accelerate texture decoding."));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Display - Display
|
// Display - Display
|
||||||
FullscreenResolution->SetToolTip(wxT("Select resolution for fullscreen mode"));
|
FullscreenResolution->SetToolTip(wxT("Select resolution for fullscreen mode"));
|
||||||
|
@ -403,9 +410,8 @@ void CConfigMain::CreateGUIControls()
|
||||||
// Core Settings - Advanced
|
// Core Settings - Advanced
|
||||||
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
|
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
|
||||||
AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, wxT("HLE the IPL (recommended)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, wxT("HLE the IPL (recommended)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
EnableOpenCL = new wxCheckBox(GeneralPage, ID_ENABLE_OPENCL, wxT("Enable OpenCL"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
EnableOpenCL = new wxCheckBox(GeneralPage, ID_ENABLE_OPENCL, wxT("Enable OpenCL"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
#if !(defined(HAVE_OPENCL) && HAVE_OPENCL)
|
|
||||||
EnableOpenCL->Enable(false);
|
|
||||||
#endif
|
#endif
|
||||||
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, wxT("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS);
|
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, wxT("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS);
|
||||||
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, wxT("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, wxT("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
@ -422,7 +428,9 @@ void CConfigMain::CreateGUIControls()
|
||||||
sbBasic->Add(sFramelimit, 0, wxALL | wxEXPAND, 5);
|
sbBasic->Add(sFramelimit, 0, wxALL | wxEXPAND, 5);
|
||||||
|
|
||||||
sbAdvanced->Add(AlwaysHLE_BS2, 0, wxALL, 5);
|
sbAdvanced->Add(AlwaysHLE_BS2, 0, wxALL, 5);
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
sbAdvanced->Add(EnableOpenCL, 0, wxALL, 5);
|
sbAdvanced->Add(EnableOpenCL, 0, wxALL, 5);
|
||||||
|
#endif
|
||||||
sbAdvanced->Add(CPUEngine, 0, wxALL, 5);
|
sbAdvanced->Add(CPUEngine, 0, wxALL, 5);
|
||||||
sbAdvanced->Add(LockThreads, 0, wxALL, 5);
|
sbAdvanced->Add(LockThreads, 0, wxALL, 5);
|
||||||
sbAdvanced->Add(DSPThread, 0, wxALL, 5);
|
sbAdvanced->Add(DSPThread, 0, wxALL, 5);
|
||||||
|
@ -818,9 +826,11 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
|
||||||
case ID_ALWAYS_HLE_BS2:
|
case ID_ALWAYS_HLE_BS2:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2 = AlwaysHLE_BS2->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2 = AlwaysHLE_BS2->IsChecked();
|
||||||
break;
|
break;
|
||||||
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
case ID_ENABLE_OPENCL:
|
case ID_ENABLE_OPENCL:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableOpenCL = EnableOpenCL->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableOpenCL = EnableOpenCL->IsChecked();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case ID_CPUENGINE:
|
case ID_CPUENGINE:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUEngine->GetSelection();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUEngine->GetSelection();
|
||||||
if (main_frame->g_pCodeWindow)
|
if (main_frame->g_pCodeWindow)
|
||||||
|
|
Loading…
Reference in New Issue