diff options
| author | 2021-10-28 20:03:23 -0400 | |
|---|---|---|
| committer | 2021-10-28 20:05:05 -0400 | |
| commit | e4052a1dab5a754e797e33bbda7778bfb5a1b8ca (patch) | |
| tree | 1872d0c191c320e8e465fa5f0aabbcd8ad93dac2 | |
| parent | Merge pull request #7223 from Moonlacer/geometry_property_removal (diff) | |
| download | yuzu-e4052a1dab5a754e797e33bbda7778bfb5a1b8ca.tar.gz yuzu-e4052a1dab5a754e797e33bbda7778bfb5a1b8ca.tar.xz yuzu-e4052a1dab5a754e797e33bbda7778bfb5a1b8ca.zip | |
ns: language: Add BrazilianPortuguese to ApplicationLanguage
It seems that Nintendo finally filled that last empty spot in ApplicationLanguage for a total of 16 supported languages.
| -rw-r--r-- | src/core/hle/service/ns/language.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/ns/language.h | 1 |
2 files changed, 26 insertions, 1 deletions
diff --git a/src/core/hle/service/ns/language.cpp b/src/core/hle/service/ns/language.cpp index 7d9e4a20b..e01c6be47 100644 --- a/src/core/hle/service/ns/language.cpp +++ b/src/core/hle/service/ns/language.cpp | |||
| @@ -277,6 +277,25 @@ constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{ | |||
| 277 | ApplicationLanguage::Korean, | 277 | ApplicationLanguage::Korean, |
| 278 | }}; | 278 | }}; |
| 279 | 279 | ||
| 280 | constexpr ApplicationLanguagePriorityList priority_list_brazilian_portuguese = {{ | ||
| 281 | ApplicationLanguage::BrazilianPortuguese, | ||
| 282 | ApplicationLanguage::Portuguese, | ||
| 283 | ApplicationLanguage::LatinAmericanSpanish, | ||
| 284 | ApplicationLanguage::AmericanEnglish, | ||
| 285 | ApplicationLanguage::BritishEnglish, | ||
| 286 | ApplicationLanguage::Japanese, | ||
| 287 | ApplicationLanguage::French, | ||
| 288 | ApplicationLanguage::German, | ||
| 289 | ApplicationLanguage::Spanish, | ||
| 290 | ApplicationLanguage::Italian, | ||
| 291 | ApplicationLanguage::Dutch, | ||
| 292 | ApplicationLanguage::CanadianFrench, | ||
| 293 | ApplicationLanguage::Russian, | ||
| 294 | ApplicationLanguage::Korean, | ||
| 295 | ApplicationLanguage::SimplifiedChinese, | ||
| 296 | ApplicationLanguage::TraditionalChinese, | ||
| 297 | }}; | ||
| 298 | |||
| 280 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList( | 299 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList( |
| 281 | const ApplicationLanguage lang) { | 300 | const ApplicationLanguage lang) { |
| 282 | switch (lang) { | 301 | switch (lang) { |
| @@ -310,6 +329,8 @@ const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList( | |||
| 310 | return &priority_list_traditional_chinese; | 329 | return &priority_list_traditional_chinese; |
| 311 | case ApplicationLanguage::SimplifiedChinese: | 330 | case ApplicationLanguage::SimplifiedChinese: |
| 312 | return &priority_list_simplified_chinese; | 331 | return &priority_list_simplified_chinese; |
| 332 | case ApplicationLanguage::BrazilianPortuguese: | ||
| 333 | return &priority_list_brazilian_portuguese; | ||
| 313 | default: | 334 | default: |
| 314 | return nullptr; | 335 | return nullptr; |
| 315 | } | 336 | } |
| @@ -339,7 +360,6 @@ std::optional<ApplicationLanguage> ConvertToApplicationLanguage( | |||
| 339 | case Set::LanguageCode::FR_CA: | 360 | case Set::LanguageCode::FR_CA: |
| 340 | return ApplicationLanguage::CanadianFrench; | 361 | return ApplicationLanguage::CanadianFrench; |
| 341 | case Set::LanguageCode::PT: | 362 | case Set::LanguageCode::PT: |
| 342 | case Set::LanguageCode::PT_BR: | ||
| 343 | return ApplicationLanguage::Portuguese; | 363 | return ApplicationLanguage::Portuguese; |
| 344 | case Set::LanguageCode::RU: | 364 | case Set::LanguageCode::RU: |
| 345 | return ApplicationLanguage::Russian; | 365 | return ApplicationLanguage::Russian; |
| @@ -351,6 +371,8 @@ std::optional<ApplicationLanguage> ConvertToApplicationLanguage( | |||
| 351 | case Set::LanguageCode::ZH_CN: | 371 | case Set::LanguageCode::ZH_CN: |
| 352 | case Set::LanguageCode::ZH_HANS: | 372 | case Set::LanguageCode::ZH_HANS: |
| 353 | return ApplicationLanguage::SimplifiedChinese; | 373 | return ApplicationLanguage::SimplifiedChinese; |
| 374 | case Set::LanguageCode::PT_BR: | ||
| 375 | return ApplicationLanguage::BrazilianPortuguese; | ||
| 354 | default: | 376 | default: |
| 355 | return std::nullopt; | 377 | return std::nullopt; |
| 356 | } | 378 | } |
| @@ -388,6 +410,8 @@ std::optional<Set::LanguageCode> ConvertToLanguageCode(const ApplicationLanguage | |||
| 388 | return Set::LanguageCode::ZH_HANT; | 410 | return Set::LanguageCode::ZH_HANT; |
| 389 | case ApplicationLanguage::SimplifiedChinese: | 411 | case ApplicationLanguage::SimplifiedChinese: |
| 390 | return Set::LanguageCode::ZH_HANS; | 412 | return Set::LanguageCode::ZH_HANS; |
| 413 | case ApplicationLanguage::BrazilianPortuguese: | ||
| 414 | return Set::LanguageCode::PT_BR; | ||
| 391 | default: | 415 | default: |
| 392 | return std::nullopt; | 416 | return std::nullopt; |
| 393 | } | 417 | } |
diff --git a/src/core/hle/service/ns/language.h b/src/core/hle/service/ns/language.h index e9829f9d2..d84c3f277 100644 --- a/src/core/hle/service/ns/language.h +++ b/src/core/hle/service/ns/language.h | |||
| @@ -30,6 +30,7 @@ enum class ApplicationLanguage : u8 { | |||
| 30 | Korean, | 30 | Korean, |
| 31 | TraditionalChinese, | 31 | TraditionalChinese, |
| 32 | SimplifiedChinese, | 32 | SimplifiedChinese, |
| 33 | BrazilianPortuguese, | ||
| 33 | Count | 34 | Count |
| 34 | }; | 35 | }; |
| 35 | using ApplicationLanguagePriorityList = | 36 | using ApplicationLanguagePriorityList = |