From fc16f28d0c4814249d76783e5e7b604a11c17a9e 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/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp b/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp index 410bad5eb..4290a0eba 100644 --- a/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp +++ b/libraries/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) {