From 068c3691112841b32fe2c2078f2bf41a3cf8b828 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 8 Jan 2024 12:20:53 -0700 Subject: [PATCH] settings: support PortugueseBr (closes #2264) --- .../stratosphere/settings/settings_types.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libstratosphere/include/stratosphere/settings/settings_types.hpp b/libstratosphere/include/stratosphere/settings/settings_types.hpp index 410bad5e..4290a0eb 100644 --- a/libstratosphere/include/stratosphere/settings/settings_types.hpp +++ b/libstratosphere/include/stratosphere/settings/settings_types.hpp @@ -53,7 +53,8 @@ namespace ams::settings { /* 4.0.0+ */ Language_SimplifiedChinese, Language_TraditionalChinese, - + /* 10.1.0+ */ + Language_PortugueseBr, Language_Count, }; @@ -92,6 +93,8 @@ namespace ams::settings { /* 4.0.0+ */ AMS_MATCH_LANGUAGE(SimplifiedChinese, "zh-Hans") AMS_MATCH_LANGUAGE(TraditionalChinese, "zh-Hant") + /* 10.1.0+ */ + AMS_MATCH_LANGUAGE(PortugueseBr, "pt-BR") #undef AMS_MATCH_LANGUAGE else { static_assert(Lang != Language_Japanese); } } @@ -116,6 +119,8 @@ namespace ams::settings { /* 4.0.0+ */ EncodeLanguage(), EncodeLanguage(), + /* 10.1.0+ */ + EncodeLanguage(), }; return EncodedLanguages[language]; } @@ -156,7 +161,11 @@ namespace ams::settings { } constexpr inline bool IsValidLanguageCodeDeprecated(const LanguageCode &lc) { - return impl::IsValidLanguageCode(lc, std::make_index_sequence{}); + return impl::IsValidLanguageCode(lc, std::make_index_sequence{}); + } + + constexpr inline bool IsValidLanguageCodeDeprecated2(const LanguageCode &lc) { + return impl::IsValidLanguageCode(lc, std::make_index_sequence{}); } constexpr inline bool IsValidLanguageCode(const LanguageCode &lc) {