summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/InputConfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/Src/InputConfig.cpp')
-rw-r--r--Source/Core/InputCommon/Src/InputConfig.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/Source/Core/InputCommon/Src/InputConfig.cpp b/Source/Core/InputCommon/Src/InputConfig.cpp
index a160349ac6..73d52aae84 100644
--- a/Source/Core/InputCommon/Src/InputConfig.cpp
+++ b/Source/Core/InputCommon/Src/InputConfig.cpp
@@ -42,24 +42,26 @@ InputPlugin::~InputPlugin()
bool InputPlugin::LoadConfig()
{
IniFile inifile;
- if (false == inifile.Load(std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini"))
+ if (inifile.Load(std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini"))
{
- controllers[0]->LoadDefaults(controller_interface);
- return false;
+ std::vector< ControllerEmu* >::const_iterator
+ i = controllers.begin(),
+ e = controllers.end();
+ for (; i!=e; ++i)
+ {
+ // load settings from ini
+ (*i)->LoadConfig(inifile.GetOrCreateSection((*i)->GetName().c_str()));
+ // update refs
+ (*i)->UpdateReferences(controller_interface);
+ }
+ return true;
}
-
- std::vector< ControllerEmu* >::const_iterator
- i = controllers.begin(),
- e = controllers.end();
- for ( ; i!=e; ++i )
+ else
{
- // load settings from ini
- (*i)->LoadConfig(inifile.GetOrCreateSection((*i)->GetName().c_str()));
- // update refs
- (*i)->UpdateReferences(controller_interface);
+ controllers[0]->LoadDefaults(controller_interface);
+ controllers[0]->UpdateReferences(controller_interface);
+ return false;
}
-
- return true;
}
void InputPlugin::SaveConfig()