From 4761afe179791ddb88f9f76dc0ebada56107746c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 15 Feb 2017 16:50:19 +0100 Subject: [PATCH] GameConfigLoader: Ignore unknown entries It's not necessarily an issue. For example, memory breakpoints are handled in a different location. --- Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp index f9f7b2d3bb..a6dd13c542 100644 --- a/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp @@ -199,9 +199,8 @@ MapINIToRealLocation(const std::string& section, const std::string& key) if (!fail) return std::make_tuple(Config::GetSystemFromName(system_str), config_section, key); - ERROR_LOG(COMMON, "Couldn't load game INI option %s-%s properly!\n", section.c_str(), - key.c_str()); - return std::make_tuple(Config::System::Main, "FAIL!", key); + WARN_LOG(COMMON, "Unknown game INI option in section %s: %s", section.c_str(), key.c_str()); + return std::make_tuple(Config::System::Main, "", ""); } return ini_to_location[std::make_pair(section, key)]; @@ -246,6 +245,10 @@ public: { std::tuple mapped_config = MapINIToRealLocation(section_name, ""); + + if (std::get<1>(mapped_config).empty() && std::get<2>(mapped_config).empty()) + continue; + auto* config_section = config_layer->GetOrCreateSection(std::get<0>(mapped_config), std::get<1>(mapped_config)); config_section->SetLines(chunk); @@ -259,6 +262,10 @@ public: { std::tuple mapped_config = MapINIToRealLocation(section_name, value.first); + + if (std::get<1>(mapped_config).empty() && std::get<2>(mapped_config).empty()) + continue; + auto* config_section = config_layer->GetOrCreateSection(std::get<0>(mapped_config), std::get<1>(mapped_config));