summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ns/language.h
diff options
context:
space:
mode:
authorMichael Scire <SciresM@gmail.com>2019-05-23 10:28:27 +0200
committerMichael Scire <SciresM@gmail.com>2019-05-23 10:28:27 +0200
commitd81b58f320f9ace1d80cfca6889cbee98813cd83 (patch)
treeb5a1886b3305b46bb561d220965c806536d2ff47 /src/core/hle/service/ns/language.h
parentclang-format fixes (diff)
downloadyuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.gz
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.bz2
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.lz
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.xz
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.zst
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/ns/language.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/hle/service/ns/language.h b/src/core/hle/service/ns/language.h
new file mode 100644
index 000000000..e9829f9d2
--- /dev/null
+++ b/src/core/hle/service/ns/language.h
@@ -0,0 +1,45 @@
+// Copyright 2019 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <optional>
+#include <string>
+#include "common/common_types.h"
+
+namespace Service::Set {
+enum class LanguageCode : u64;
+}
+
+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)>;
+
+constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
+ return 1U << static_cast<u32>(lang);
+}
+
+const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
+std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Set::LanguageCode language_code);
+std::optional<Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
+} // namespace Service::NS \ No newline at end of file