summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2015-07-15 11:29:37 +1000
committerskidau <skidau@gmail.com>2015-07-15 11:29:37 +1000
commit41bdaece5ef31a6fd31785ff79f6a54aa9728202 (patch)
treeef3bc5c6846299278e4a674c7a7ae0397e466019 /Source
parenta12a4520d8b677c160108a8e8ce93d8c937219d7 (diff)
parentcae00254a5c6c1d177b13552243613a92bf37738 (diff)
Merge pull request #2744 from mathieui/gcadapter-stopthread
GCAdapter: Disable the scanning thread when direct connect is disabled
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/SI_GCAdapter.cpp4
-rw-r--r--Source/Core/DolphinWX/ControllerConfigDiag.cpp1
-rw-r--r--Source/Core/DolphinWX/ControllerConfigDiag.h4
3 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/Core/HW/SI_GCAdapter.cpp b/Source/Core/Core/HW/SI_GCAdapter.cpp
index b54c07ef74..8660f44d65 100644
--- a/Source/Core/Core/HW/SI_GCAdapter.cpp
+++ b/Source/Core/Core/HW/SI_GCAdapter.cpp
@@ -146,11 +146,13 @@ void Init()
if (ret)
{
ERROR_LOG(SERIALINTERFACE, "libusb_init failed with error: %d", ret);
+ s_libusb_driver_not_supported = true;
Shutdown();
}
else
{
- StartScanThread();
+ if (SConfig::GetInstance().m_GameCubeAdapter)
+ StartScanThread();
}
}
diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
index ff5bafc44e..170439f1f5 100644
--- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp
+++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
@@ -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
diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.h b/Source/Core/DolphinWX/ControllerConfigDiag.h
index 5fa2c0f52e..3c6582a5e1 100644
--- a/Source/Core/DolphinWX/ControllerConfigDiag.h
+++ b/Source/Core/DolphinWX/ControllerConfigDiag.h
@@ -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)