MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / MapNameToOption

Method MapNameToOption

Source/Common/Config.cpp:196–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 : FEXCore::Config::Layer(Layer) {}
195
196void OptionMapper::MapNameToOption(const char* ConfigName, const char* ConfigString) {
197 std::optional<FEXCore::Config::ConfigOption> KeyOptionValue;
198 for (auto& it : ConfigLookup) {
199 if (it.first != ConfigName) {
200 continue;
201 }
202
203 KeyOptionValue = it.second;
204 break;
205 }
206
207 if (!KeyOptionValue.has_value()) {
208 LogMan::Msg::IFmt("Unknown configuration option '{}' in JSON config file '{}'", ConfigName, CurrentConfigFile);
209 return;
210 }
211
212 const auto KeyOption = *KeyOptionValue;
213 const auto KeyName = std::string_view(ConfigName);
214 const auto Value_View = std::string_view(ConfigString);
215#define JSONLOADER
216#include <FEXCore/Config/ConfigOptions.inl>
217}
218
219MainLoader::MainLoader(FEXCore::Config::LayerType Type)
220 : OptionMapper(Type)

Callers

nothing calls this directly

Calls 1

IFmtFunction · 0.85

Tested by

no test coverage detected