Port Wiimote source settings to the new config system

This lets us finally get rid of BootManager's ConfigCache!
This commit is contained in:
JosJuice
2022-01-25 20:34:03 +01:00
parent 5e59561637
commit aff45c91fc
17 changed files with 134 additions and 172 deletions

View File

@ -106,7 +106,6 @@ void Init()
SConfig::Init();
Discord::Init();
Common::Log::LogManager::Init();
WiimoteReal::LoadSettings();
GCAdapter::Init();
VideoBackendBase::ActivateBackend(Config::Get(Config::MAIN_GFX_BACKEND));
@ -356,29 +355,6 @@ void SetUserDirectory(std::string custom_path)
File::SetUserPath(D_USER_IDX, std::move(user_path));
}
void SaveWiimoteSources()
{
std::string ini_filename = File::GetUserPath(D_CONFIG_IDX) + WIIMOTE_INI_NAME ".ini";
IniFile inifile;
inifile.Load(ini_filename);
for (unsigned int i = 0; i < MAX_WIIMOTES; ++i)
{
std::string secname("Wiimote");
secname += (char)('1' + i);
IniFile::Section& sec = *inifile.GetOrCreateSection(secname);
sec.Set("Source", int(WiimoteCommon::GetSource(i)));
}
std::string secname("BalanceBoard");
IniFile::Section& sec = *inifile.GetOrCreateSection(secname);
sec.Set("Source", int(WiimoteCommon::GetSource(WIIMOTE_BALANCE_BOARD)));
inifile.Save(ini_filename);
}
bool TriggerSTMPowerEvent()
{
const auto ios = IOS::HLE::GetIOS();