Merge pull request #2744 from mathieui/gcadapter-stopthread
GCAdapter: Disable the scanning thread when direct connect is disabled
This commit is contained in:
commit
41bdaece5e
|
@ -146,10 +146,12 @@ void Init()
|
|||
if (ret)
|
||||
{
|
||||
ERROR_LOG(SERIALINTERFACE, "libusb_init failed with error: %d", ret);
|
||||
s_libusb_driver_not_supported = true;
|
||||
Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SConfig::GetInstance().m_GameCubeAdapter)
|
||||
StartScanThread();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,6 +174,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer()
|
|||
m_adapter_status->SetLabelText(_("Driver Not Detected"));
|
||||
gamecube_adapter->Disable();
|
||||
gamecube_adapter->SetValue(false);
|
||||
gamecube_rumble->Disable();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -73,6 +73,10 @@ private:
|
|||
void OnGameCubeAdapter(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
||||
if (event.IsChecked())
|
||||
SI_GCAdapter::StartScanThread();
|
||||
else
|
||||
SI_GCAdapter::StopScanThread();
|
||||
event.Skip();
|
||||
}
|
||||
void OnAdapterRumble(wxCommandEvent& event)
|
||||
|
|
Loading…
Reference in New Issue