Qt: Add controller (overview) window

This commit is contained in:
spycrab
2017-05-09 18:49:10 +02:00
parent a11775396f
commit c8d0b647ac
14 changed files with 708 additions and 27 deletions

View File

@ -197,4 +197,27 @@ void SetUserDirectory(const std::string& custom_path)
File::SetUserPath(D_USER_IDX, 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)g_wiimote_sources[i]);
}
std::string secname("BalanceBoard");
IniFile::Section& sec = *inifile.GetOrCreateSection(secname);
sec.Set("Source", (int)g_wiimote_sources[WIIMOTE_BALANCE_BOARD]);
inifile.Save(ini_filename);
}
} // namespace UICommon