summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorMichael Scire <SciresM@gmail.com>2019-05-23 10:14:11 +0200
committerMichael Scire <SciresM@gmail.com>2019-05-23 10:14:11 +0200
commit7fba9c7224d6a2bd358777e8854fa51232b54017 (patch)
treebae400349914cdc3ad455e2d77d4e4ce92d901ad /src/core/hle/service
parentImplement IApplicationFunctions::GetDesiredLanguage (diff)
downloadyuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.gz
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.bz2
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.lz
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.xz
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.tar.zst
yuzu-7fba9c7224d6a2bd358777e8854fa51232b54017.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/ns/errors.h1
-rw-r--r--src/core/hle/service/ns/ns.h2
-rw-r--r--src/core/hle/service/ns/ns_language.cpp3
-rw-r--r--src/core/hle/service/ns/ns_language.h57
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 @@
namespace Service::NS {
constexpr ResultCode ERR_APPLICATION_LANGUAGE_NOT_FOUND{ErrorModule::NS, 300};
-
} \ 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:
rb.PushIpcInterface<T>();
}
- template<typename T>
+ template <typename T>
std::shared_ptr<T> GetInterface() {
static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>,
"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 = {{
ApplicationLanguage::Korean,
}};
-const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang) {
+const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(
+ ApplicationLanguage lang) {
switch (lang) {
case ApplicationLanguage::AmericanEnglish:
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 @@
#include "core/hle/service/set/set.h"
namespace Service::NS {
- /// This is nn::ns::detail::ApplicationLanguage
- enum class ApplicationLanguage : u8 {
- AmericanEnglish = 0,
- BritishEnglish,
- Japanese,
- French,
- German,
- LatinAmericanSpanish,
- Spanish,
- Italian,
- Dutch,
- CanadianFrench,
- Portuguese,
- Russian,
- Korean,
- TraditionalChinese,
- SimplifiedChinese,
- Count
- };
- using ApplicationLanguagePriorityList = const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
+/// This is nn::ns::detail::ApplicationLanguage
+enum class ApplicationLanguage : u8 {
+ AmericanEnglish = 0,
+ BritishEnglish,
+ Japanese,
+ French,
+ German,
+ LatinAmericanSpanish,
+ Spanish,
+ Italian,
+ Dutch,
+ CanadianFrench,
+ Portuguese,
+ Russian,
+ Korean,
+ TraditionalChinese,
+ SimplifiedChinese,
+ Count
+};
+using ApplicationLanguagePriorityList =
+ const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
- constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
- return 1u << static_cast<u32>(lang);
- }
+constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
+ return 1u << static_cast<u32>(lang);
+}
-
- const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
- std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Service::Set::LanguageCode language_code);
- std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
-} \ No newline at end of file
+const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
+std::optional<ApplicationLanguage> ConvertToApplicationLanguage(
+ Service::Set::LanguageCode language_code);
+std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
+} // namespace Service::NS \ No newline at end of file