Add missing ifdefs around GCAdapter code in Controller config

Otherwise the build fails if libusb is not found
This commit is contained in:
mathieui 2015-05-01 17:56:15 +02:00
parent 9348b2e1a6
commit 7b45eae6e7
1 changed files with 4 additions and 0 deletions

View File

@ -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
}