summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/am.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-07-12 07:45:08 +0200
committerGitHub <noreply@github.com>2020-07-12 07:45:08 +0200
commite60733aad35d430de7cd88a4e352e726ad5740ca (patch)
treee3141e5bbd49bc97b776534beaf9cd9c1a731ac9 /src/core/hle/service/am/am.cpp
parentMerge pull request #4289 from ReinUsesLisp/dynfix (diff)
parentAM: fix GetDesiredLanguage: (diff)
downloadyuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.gz
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.bz2
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.lz
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.xz
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.zst
yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.zip
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-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();
}