Add missing ifdefs around GCAdapter code in Controller config
Otherwise the build fails if libusb is not found
This commit is contained in:
parent
9348b2e1a6
commit
7b45eae6e7
|
@ -200,12 +200,14 @@ void ControllerConfigDiag::ScheduleAdapterUpdate()
|
|||
|
||||
void ControllerConfigDiag::UpdateAdapter(wxCommandEvent& ev)
|
||||
{
|
||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
||||
bool unpause = Core::PauseAndLock(true);
|
||||
if (SI_GCAdapter::IsDetected())
|
||||
m_adapter_status->SetLabelText(_("Adapter Detected"));
|
||||
else
|
||||
m_adapter_status->SetLabelText(_("Adapter Not Detected"));
|
||||
Core::PauseAndLock(false, unpause);
|
||||
#endif
|
||||
}
|
||||
|
||||
wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
|
||||
|
@ -568,5 +570,7 @@ void ControllerConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event)
|
|||
|
||||
ControllerConfigDiag::~ControllerConfigDiag()
|
||||
{
|
||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
||||
SI_GCAdapter::SetAdapterCallback(nullptr);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue