From d7cd316a6c8e2438a19fc685707ea333ca6fe0db Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 27 Jul 2021 08:54:41 -0400 Subject: [PATCH 1/2] service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese --- src/core/hle/service/ns/language.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/hle/service/ns/language.cpp b/src/core/hle/service/ns/language.cpp index 29c4a820c..54b644830 100644 --- a/src/core/hle/service/ns/language.cpp +++ b/src/core/hle/service/ns/language.cpp @@ -344,8 +344,10 @@ std::optional ConvertToApplicationLanguage( return ApplicationLanguage::Russian; case Set::LanguageCode::KO: return ApplicationLanguage::Korean; + case Set::LanguageCode::ZH_TW: case Set::LanguageCode::ZH_HANT: return ApplicationLanguage::TraditionalChinese; + case Set::LanguageCode::ZH_CN: case Set::LanguageCode::ZH_HANS: return ApplicationLanguage::SimplifiedChinese; default: From a6359fe9ae451e5245b4ae7f98eed802de9ee281 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 27 Jul 2021 08:59:26 -0400 Subject: [PATCH 2/2] service: ns: Remove unused ns_language header --- src/core/hle/service/ns/ns_language.h | 42 --------------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/core/hle/service/ns/ns_language.h diff --git a/src/core/hle/service/ns/ns_language.h b/src/core/hle/service/ns/ns_language.h deleted file mode 100644 index 59ac85a19..000000000 --- a/src/core/hle/service/ns/ns_language.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2019 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once -#include -#include -#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::Count)>; - -constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) { - return 1U << static_cast(lang); -} - -const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang); -std::optional ConvertToApplicationLanguage( - Service::Set::LanguageCode language_code); -std::optional ConvertToLanguageCode(ApplicationLanguage lang); -} // namespace Service::NS \ No newline at end of file