Config: Port WiimoteContinuousScanning setting to new config system.
This commit is contained in:
parent
b2da738c81
commit
8c554d2e64
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -50,7 +50,6 @@ struct BootParameters;
|
|||
struct SConfig
|
||||
{
|
||||
// Wii Devices
|
||||
bool m_WiimoteContinuousScanning;
|
||||
bool m_WiimoteEnableSpeaker;
|
||||
bool connect_wiimotes_for_ciface;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue