diff options
| author | 2019-05-23 01:14:11 -0700 | |
|---|---|---|
| committer | 2019-05-23 01:14:11 -0700 | |
| commit | 7fba9c7224d6a2bd358777e8854fa51232b54017 (patch) | |
| tree | bae400349914cdc3ad455e2d77d4e4ce92d901ad /src/core/hle | |
| parent | Implement IApplicationFunctions::GetDesiredLanguage (diff) | |
| download | yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.gz yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.xz yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.zip | |
clang-format fixes
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/ns/errors.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns_language.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns_language.h | 57 |
4 files changed, 32 insertions, 31 deletions
diff --git a/src/core/hle/service/ns/errors.h b/src/core/hle/service/ns/errors.h index 6b85008dd..f4aea8a65 100644 --- a/src/core/hle/service/ns/errors.h +++ b/src/core/hle/service/ns/errors.h | |||
| @@ -9,5 +9,4 @@ | |||
| 9 | namespace Service::NS { | 9 | namespace Service::NS { |
| 10 | 10 | ||
| 11 | constexpr ResultCode ERR_APPLICATION_LANGUAGE_NOT_FOUND{ErrorModule::NS, 300}; | 11 | constexpr ResultCode ERR_APPLICATION_LANGUAGE_NOT_FOUND{ErrorModule::NS, 300}; |
| 12 | |||
| 13 | } \ No newline at end of file | 12 | } \ No newline at end of file |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index a2b35e795..155dd6831 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -73,7 +73,7 @@ private: | |||
| 73 | rb.PushIpcInterface<T>(); | 73 | rb.PushIpcInterface<T>(); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | template<typename T> | 76 | template <typename T> |
| 77 | std::shared_ptr<T> GetInterface() { | 77 | std::shared_ptr<T> GetInterface() { |
| 78 | static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, | 78 | static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, |
| 79 | "Not a base of ServiceFrameworkBase"); | 79 | "Not a base of ServiceFrameworkBase"); |
diff --git a/src/core/hle/service/ns/ns_language.cpp b/src/core/hle/service/ns/ns_language.cpp index cce9098b4..fa95e75da 100644 --- a/src/core/hle/service/ns/ns_language.cpp +++ b/src/core/hle/service/ns/ns_language.cpp | |||
| @@ -276,7 +276,8 @@ constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{ | |||
| 276 | ApplicationLanguage::Korean, | 276 | ApplicationLanguage::Korean, |
| 277 | }}; | 277 | }}; |
| 278 | 278 | ||
| 279 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang) { | 279 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList( |
| 280 | ApplicationLanguage lang) { | ||
| 280 | switch (lang) { | 281 | switch (lang) { |
| 281 | case ApplicationLanguage::AmericanEnglish: | 282 | case ApplicationLanguage::AmericanEnglish: |
| 282 | return &priority_list_american_english; | 283 | return &priority_list_american_english; |
diff --git a/src/core/hle/service/ns/ns_language.h b/src/core/hle/service/ns/ns_language.h index 8c3ec4449..55d7b0bd2 100644 --- a/src/core/hle/service/ns/ns_language.h +++ b/src/core/hle/service/ns/ns_language.h | |||
| @@ -9,33 +9,34 @@ | |||
| 9 | #include "core/hle/service/set/set.h" | 9 | #include "core/hle/service/set/set.h" |
| 10 | 10 | ||
| 11 | namespace Service::NS { | 11 | namespace Service::NS { |
| 12 | /// This is nn::ns::detail::ApplicationLanguage | 12 | /// This is nn::ns::detail::ApplicationLanguage |
| 13 | enum class ApplicationLanguage : u8 { | 13 | enum class ApplicationLanguage : u8 { |
| 14 | AmericanEnglish = 0, | 14 | AmericanEnglish = 0, |
| 15 | BritishEnglish, | 15 | BritishEnglish, |
| 16 | Japanese, | 16 | Japanese, |
| 17 | French, | 17 | French, |
| 18 | German, | 18 | German, |
| 19 | LatinAmericanSpanish, | 19 | LatinAmericanSpanish, |
| 20 | Spanish, | 20 | Spanish, |
| 21 | Italian, | 21 | Italian, |
| 22 | Dutch, | 22 | Dutch, |
| 23 | CanadianFrench, | 23 | CanadianFrench, |
| 24 | Portuguese, | 24 | Portuguese, |
| 25 | Russian, | 25 | Russian, |
| 26 | Korean, | 26 | Korean, |
| 27 | TraditionalChinese, | 27 | TraditionalChinese, |
| 28 | SimplifiedChinese, | 28 | SimplifiedChinese, |
| 29 | Count | 29 | Count |
| 30 | }; | 30 | }; |
| 31 | using ApplicationLanguagePriorityList = const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>; | 31 | using ApplicationLanguagePriorityList = |
| 32 | const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>; | ||
| 32 | 33 | ||
| 33 | constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) { | 34 | constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) { |
| 34 | return 1u << static_cast<u32>(lang); | 35 | return 1u << static_cast<u32>(lang); |
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | 38 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang); | |
| 38 | const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang); | 39 | std::optional<ApplicationLanguage> ConvertToApplicationLanguage( |
| 39 | std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Service::Set::LanguageCode language_code); | 40 | Service::Set::LanguageCode language_code); |
| 40 | std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang); | 41 | std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang); |
| 41 | } \ No newline at end of file | 42 | } // namespace Service::NS \ No newline at end of file |