mirror of
https://github.com/JesseTG/melonds-ds.git
synced 2024-11-28 01:00:33 +00:00
Add ParseLanguage
This commit is contained in:
parent
690f22f977
commit
1c366f7efb
@ -78,3 +78,16 @@ optional<melonds::HybridSideScreenDisplay> melonds::config::ParseHybridSideScree
|
||||
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
std::optional<melonds::FirmwareLanguage> melonds::config::ParseLanguage(std::string_view value) noexcept {
|
||||
if (value == values::AUTO) return melonds::FirmwareLanguage::Auto;
|
||||
if (value == values::DEFAULT) return melonds::FirmwareLanguage::Default;
|
||||
if (value == values::JAPANESE) return melonds::FirmwareLanguage::Japanese;
|
||||
if (value == values::ENGLISH) return melonds::FirmwareLanguage::English;
|
||||
if (value == values::FRENCH) return melonds::FirmwareLanguage::French;
|
||||
if (value == values::GERMAN) return melonds::FirmwareLanguage::German;
|
||||
if (value == values::ITALIAN) return melonds::FirmwareLanguage::Italian;
|
||||
if (value == values::SPANISH) return melonds::FirmwareLanguage::Spanish;
|
||||
|
||||
return nullopt;
|
||||
}
|
@ -235,6 +235,8 @@ namespace melonds::config {
|
||||
|
||||
std::optional<melonds::HybridSideScreenDisplay> ParseHybridSideScreenDisplay(const char *value) noexcept;
|
||||
|
||||
std::optional<melonds::FirmwareLanguage> ParseLanguage(std::string_view value) noexcept;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user