diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-12 07:45:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 07:45:08 +0200 |
commit | e60733aad35d430de7cd88a4e352e726ad5740ca (patch) | |
tree | e3141e5bbd49bc97b776534beaf9cd9c1a731ac9 /src | |
parent | Merge pull request #4289 from ReinUsesLisp/dynfix (diff) | |
parent | AM: fix GetDesiredLanguage: (diff) | |
download | yuzu-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')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 14 |
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(); } |