aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbunnei <[email protected]>2020-07-12 01:45:08 -0400
committerGitHub <[email protected]>2020-07-12 01:45:08 -0400
commite60733aad35d430de7cd88a4e352e726ad5740ca (patch)
treee3141e5bbd49bc97b776534beaf9cd9c1a731ac9
parent5fb27f83cf99a9e36c7c1c3a1bb357208cbf7723 (diff)
parentcf76769026ae417fa3822d499f6a55ef084ec2da (diff)
downloadyuzu-mainline-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.gz
yuzu-mainline-e60733aad35d430de7cd88a4e352e726ad5740ca.zip
Merge pull request #4275 from CrazyMax/desired_language
AM: fix GetDesiredLanguage:
-rw-r--r--src/core/hle/service/am/am.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 256449aa7..4e7a0bec9 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1407,7 +1407,19 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
u32 supported_languages = 0;
FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
- const auto res = pm.GetControlMetadata();
+ const auto res = [this] {
+ const auto title_id = system.CurrentProcess()->GetTitleID();
+
+ FileSys::PatchManager pm{title_id};
+ auto res = pm.GetControlMetadata();
+ if (res.first != nullptr) {
+ return res;
+ }
+
+ FileSys::PatchManager pm_update{FileSys::GetUpdateTitleID(title_id)};
+ return pm_update.GetControlMetadata();
+ }();
+
if (res.first != nullptr) {
supported_languages = res.first->GetSupportedLanguages();
}