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
2026-04-18 16:56:25 +02:00
parent 42175d4e75
commit cc01a60347
6 changed files with 30 additions and 62 deletions

View File

@@ -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();
}