GameConfigLoader: Ignore unknown entries
It's not necessarily an issue. For example, memory breakpoints are handled in a different location.
This commit is contained in:
parent
9dbb6f9022
commit
4761afe179
|
@ -199,9 +199,8 @@ MapINIToRealLocation(const std::string& section, const std::string& key)
|
||||||
if (!fail)
|
if (!fail)
|
||||||
return std::make_tuple(Config::GetSystemFromName(system_str), config_section, key);
|
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(),
|
WARN_LOG(COMMON, "Unknown game INI option in section %s: %s", section.c_str(), key.c_str());
|
||||||
key.c_str());
|
return std::make_tuple(Config::System::Main, "", "");
|
||||||
return std::make_tuple(Config::System::Main, "FAIL!", key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ini_to_location[std::make_pair(section, key)];
|
return ini_to_location[std::make_pair(section, key)];
|
||||||
|
@ -246,6 +245,10 @@ public:
|
||||||
{
|
{
|
||||||
std::tuple<Config::System, std::string, std::string> mapped_config =
|
std::tuple<Config::System, std::string, std::string> mapped_config =
|
||||||
MapINIToRealLocation(section_name, "");
|
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),
|
auto* config_section = config_layer->GetOrCreateSection(std::get<0>(mapped_config),
|
||||||
std::get<1>(mapped_config));
|
std::get<1>(mapped_config));
|
||||||
config_section->SetLines(chunk);
|
config_section->SetLines(chunk);
|
||||||
|
@ -259,6 +262,10 @@ public:
|
||||||
{
|
{
|
||||||
std::tuple<Config::System, std::string, std::string> mapped_config =
|
std::tuple<Config::System, std::string, std::string> mapped_config =
|
||||||
MapINIToRealLocation(section_name, value.first);
|
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),
|
auto* config_section = config_layer->GetOrCreateSection(std::get<0>(mapped_config),
|
||||||
std::get<1>(mapped_config));
|
std::get<1>(mapped_config));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue