GCAdapter: Automatically start and stop thread

This keeps the logic encapsulated inside GCAdapter.cpp so callers don't
have to think about it.
This commit is contained in:
JosJuice committed 2026-04-18 19:40:25 +02:00
1 parent 42175d4e75
commit cc01a60347
6 files changed
+30 -62

No files matched your search

@@ -26,8 +26,6 @@
#include "DolphinQt/QtUtils/SignalBlocking.h"
#include "DolphinQt/Settings.h"
#include "InputCommon/GCAdapter.h"
using SIDeviceName = std::pair<SerialInterface::SIDevices, const char*>;
static constexpr std::array s_gc_types = {
SIDeviceName{SerialInterface::SIDEVICE_NONE, _trans("None")},
@@ -205,10 +203,6 @@ void GamecubeControllersWidget::SaveSettings()
}
}
}
if (GCAdapter::UseAdapter())
GCAdapter::StartScanThread();
else
GCAdapter::StopScanThread();
SConfig::GetInstance().SaveSettings();
}