diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/control_metadata.cpp | 3 | ||||
| -rw-r--r-- | src/core/file_sys/control_metadata.h | 3 | ||||
| -rw-r--r-- | src/core/hle/service/ns/language.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/ns/language.h | 1 |
4 files changed, 30 insertions, 3 deletions
diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp index f66759815..05936f3c3 100644 --- a/src/core/file_sys/control_metadata.cpp +++ b/src/core/file_sys/control_metadata.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | namespace FileSys { | 10 | namespace FileSys { |
| 11 | 11 | ||
| 12 | const std::array<const char*, 15> LANGUAGE_NAMES{{ | 12 | const std::array<const char*, 16> LANGUAGE_NAMES{{ |
| 13 | "AmericanEnglish", | 13 | "AmericanEnglish", |
| 14 | "BritishEnglish", | 14 | "BritishEnglish", |
| 15 | "Japanese", | 15 | "Japanese", |
| @@ -25,6 +25,7 @@ const std::array<const char*, 15> LANGUAGE_NAMES{{ | |||
| 25 | "Korean", | 25 | "Korean", |
| 26 | "Taiwanese", | 26 | "Taiwanese", |
| 27 | "Chinese", | 27 | "Chinese", |
| 28 | "BrazilianPortuguese", | ||
| 28 | }}; | 29 | }}; |
| 29 | 30 | ||
| 30 | std::string LanguageEntry::GetApplicationName() const { | 31 | std::string LanguageEntry::GetApplicationName() const { |
diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index dd9837cf5..af2b723df 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h | |||
| @@ -88,11 +88,12 @@ enum class Language : u8 { | |||
| 88 | Korean = 12, | 88 | Korean = 12, |
| 89 | Taiwanese = 13, | 89 | Taiwanese = 13, |
| 90 | Chinese = 14, | 90 | Chinese = 14, |
| 91 | BrazilianPortuguese = 15, | ||
| 91 | 92 | ||
| 92 | Default = 255, | 93 | Default = 255, |
| 93 | }; | 94 | }; |
| 94 | 95 | ||
| 95 | extern const std::array<const char*, 15> LANGUAGE_NAMES; | 96 | extern const std::array<const char*, 16> LANGUAGE_NAMES; |
| 96 | 97 | ||
| 97 | // A class representing the format used by NX metadata files, typically named Control.nacp. | 98 | // A class representing the format used by NX metadata files, typically named Control.nacp. |
| 98 | // These store application name, dev name, title id, and other miscellaneous data. | 99 | // These store application name, dev name, title id, and other miscellaneous data. |
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 = |