Fix loading of non-mapped keys

This commit is contained in:
Henrik Rydgard committed 2013-08-18 01:04:49 +02:00
1 parent 71404c3d13
commit 1fabe1f78e
1 file changed
+3 -4
+3 -4
View File
@@ -632,14 +632,13 @@ void LoadFromIni(IniFile &file) {
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
for (int i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
if (!controls->Exists(psp_button_names[i].name.c_str()))
continue;
std::string value;
controls->Get(psp_button_names[i].name.c_str(), &value, "");
if (value.empty())
continue;
// Erase default mapping
g_controllerMap.erase(psp_button_names[i].key);
if (value.empty())
continue;
std::vector<std::string> mappings;
SplitString(value, ',', mappings);