Merge pull request #10443 from JosJuice/port-wiimote-source

Port Wiimote source settings to the new config system
This commit is contained in:
Léo Lam
2022-02-18 21:38:02 +01:00
committed by GitHub
17 changed files with 134 additions and 172 deletions

View File

@ -108,7 +108,6 @@ void Init()
SConfig::Init();
Discord::Init();
Common::Log::LogManager::Init();
WiimoteReal::LoadSettings();
GCAdapter::Init();
VideoBackendBase::ActivateBackend(Config::Get(Config::MAIN_GFX_BACKEND));
@ -358,29 +357,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();