Skip to content

Commit

Permalink
Merge pull request #2354 from mathieui/build-without-libusb
Browse files Browse the repository at this point in the history
Add missing ifdefs around GCAdapter code in Controller config
  • Loading branch information
degasus committed May 1, 2015
2 parents 9348b2e + 7b45eae commit 1eb901f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Core/DolphinWX/ControllerConfigDiag.cpp
Expand Up @@ -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()
Expand Down Expand Up @@ -568,5 +570,7 @@ void ControllerConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event)

ControllerConfigDiag::~ControllerConfigDiag()
{
#if defined(__LIBUSB__) || defined (_WIN32)
SI_GCAdapter::SetAdapterCallback(nullptr);
#endif
}

0 comments on commit 1eb901f

Please sign in to comment.