mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Use only section-based ini reading.
This commit is contained in:
parent
7416b9cdb4
commit
f05d3f6e5d
24 changed files with 742 additions and 661 deletions
|
@ -36,16 +36,21 @@ bool InputPlugin::LoadConfig(bool isGC)
|
|||
type = "Wiimote";
|
||||
path = "Profiles/Wiimote/";
|
||||
}
|
||||
|
||||
game_ini.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
|
||||
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", true);
|
||||
IniFile::Section* control_section = game_ini.GetOrCreateSection("Controls");
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (game_ini.Exists("Controls", type + "Profile" + num[i]))
|
||||
if (control_section->Exists(type + "Profile" + num[i]))
|
||||
{
|
||||
if (game_ini.Get("Controls", type + "Profile" + num[i], &profile[i]))
|
||||
if (control_section->Get(type + "Profile" + num[i], &profile[i]))
|
||||
{
|
||||
if (File::Exists(File::GetUserPath(D_CONFIG_IDX) + path + profile[i] + ".ini"))
|
||||
{
|
||||
useProfile[i] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Having a PanicAlert for this is dumb.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue