diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index f0d619f27d..60944f1b59 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -107,6 +107,7 @@ bool IsSettingSaveable(const Config::Location& config_location) &Config::MAIN_TIMING_VARIANCE.GetLocation(), &Config::MAIN_WII_SD_CARD.GetLocation(), &Config::MAIN_WII_KEYBOARD.GetLocation(), + &Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING.GetLocation(), // UI.General diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 4bfc91698a..4402817a1f 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -111,7 +111,6 @@ void SConfig::SaveCoreSettings(IniFile& ini) { core->Set(fmt::format("SIDevice{}", i), m_SIDevice[i]); } - core->Set("WiimoteContinuousScanning", m_WiimoteContinuousScanning); core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker); core->Set("WiimoteControllerInterface", connect_wiimotes_for_ciface); core->Set("MMU", bMMU); @@ -141,7 +140,6 @@ void SConfig::LoadCoreSettings(IniFile& ini) core->Get(fmt::format("SIDevice{}", i), &m_SIDevice[i], (i == 0) ? SerialInterface::SIDEVICE_GC_CONTROLLER : SerialInterface::SIDEVICE_NONE); } - core->Get("WiimoteContinuousScanning", &m_WiimoteContinuousScanning, false); core->Get("WiimoteEnableSpeaker", &m_WiimoteEnableSpeaker, false); core->Get("WiimoteControllerInterface", &connect_wiimotes_for_ciface, false); core->Get("MMU", &bMMU, bMMU); diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 73689ad288..bbb111cc8a 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -50,7 +50,6 @@ struct BootParameters; struct SConfig { // Wii Devices - bool m_WiimoteContinuousScanning; bool m_WiimoteEnableSpeaker; bool connect_wiimotes_for_ciface; diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp index 06ae8e790a..328994a0c8 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp @@ -843,7 +843,7 @@ void Initialize(::Wiimote::InitializeMode init_mode) s_wiimote_scanner.StartThread(); } - if (SConfig::GetInstance().m_WiimoteContinuousScanning) + if (Config::Get(Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING)) s_wiimote_scanner.SetScanMode(WiimoteScanMode::CONTINUOUSLY_SCAN); else s_wiimote_scanner.SetScanMode(WiimoteScanMode::DO_NOT_SCAN); @@ -957,7 +957,7 @@ static void HandleWiimoteDisconnect(int index) // This is called from the GUI thread void Refresh() { - if (!SConfig::GetInstance().m_WiimoteContinuousScanning) + if (!Config::Get(Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING)) s_wiimote_scanner.SetScanMode(WiimoteScanMode::SCAN_ONCE); } diff --git a/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp b/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp index 70a65f5752..418dba8371 100644 --- a/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp +++ b/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp @@ -307,7 +307,7 @@ void WiimoteControllersWidget::LoadSettings() WiimoteSource::Real); m_wiimote_speaker_data->setChecked(SConfig::GetInstance().m_WiimoteEnableSpeaker); m_wiimote_ciface->setChecked(SConfig::GetInstance().connect_wiimotes_for_ciface); - m_wiimote_continuous_scanning->setChecked(SConfig::GetInstance().m_WiimoteContinuousScanning); + m_wiimote_continuous_scanning->setChecked(Config::Get(Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING)); if (Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED)) m_wiimote_passthrough->setChecked(true); @@ -321,7 +321,8 @@ void WiimoteControllersWidget::SaveSettings() { SConfig::GetInstance().m_WiimoteEnableSpeaker = m_wiimote_speaker_data->isChecked(); SConfig::GetInstance().connect_wiimotes_for_ciface = m_wiimote_ciface->isChecked(); - SConfig::GetInstance().m_WiimoteContinuousScanning = m_wiimote_continuous_scanning->isChecked(); + Config::SetBaseOrCurrent(Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING, + m_wiimote_continuous_scanning->isChecked()); Config::SetBaseOrCurrent(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED, m_wiimote_passthrough->isChecked());