Qt: Add controller (overview) window
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -12,4 +12,5 @@ void Shutdown();
|
||||
void CreateDirectories();
|
||||
void SetUserDirectory(const std::string& custom_path);
|
||||
|
||||
void SaveWiimoteSources();
|
||||
} // namespace UICommon
|
||||
|
||||
Reference in New Issue
Block a user