diff options
author | bunnei <[email protected]> | 2020-07-12 01:45:08 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-12 01:45:08 -0400 |
commit | e60733aad35d430de7cd88a4e352e726ad5740ca (patch) | |
tree | e3141e5bbd49bc97b776534beaf9cd9c1a731ac9 | |
parent | 5fb27f83cf99a9e36c7c1c3a1bb357208cbf7723 (diff) | |
parent | cf76769026ae417fa3822d499f6a55ef084ec2da (diff) | |
download | yuzu-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.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(); } |