diff options
author | Michael Scire <SciresM@gmail.com> | 2019-05-23 09:55:56 +0200 |
---|---|---|
committer | Michael Scire <SciresM@gmail.com> | 2019-05-23 09:55:56 +0200 |
commit | 7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2 (patch) | |
tree | 020e199743748138d062cd07c40f13f028c06bef /src/core/hle/service/ns/ns_language.h | |
parent | shader/decode/memory: Remove left in debug pragma (diff) | |
download | yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar.gz yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar.bz2 yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar.lz yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar.xz yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.tar.zst yuzu-7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/ns/ns_language.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/core/hle/service/ns/ns_language.h b/src/core/hle/service/ns/ns_language.h new file mode 100644 index 000000000..8c3ec4449 --- /dev/null +++ b/src/core/hle/service/ns/ns_language.h @@ -0,0 +1,41 @@ +// Copyright 2018 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" +#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)>; + + 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 |