diff options
| author | 2020-07-12 01:45:08 -0400 | |
|---|---|---|
| committer | 2020-07-12 01:45:08 -0400 | |
| commit | e60733aad35d430de7cd88a4e352e726ad5740ca (patch) | |
| tree | e3141e5bbd49bc97b776534beaf9cd9c1a731ac9 /src | |
| parent | Merge pull request #4289 from ReinUsesLisp/dynfix (diff) | |
| parent | AM: fix GetDesiredLanguage: (diff) | |
| download | yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.gz yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.tar.xz yuzu-e60733aad35d430de7cd88a4e352e726ad5740ca.zip | |
Merge pull request #4275 from CrazyMax/desired_language
AM: fix GetDesiredLanguage:
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) { | |||
| 1407 | u32 supported_languages = 0; | 1407 | u32 supported_languages = 0; |
| 1408 | FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()}; | 1408 | FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()}; |
| 1409 | 1409 | ||
| 1410 | const auto res = pm.GetControlMetadata(); | 1410 | const auto res = [this] { |
| 1411 | const auto title_id = system.CurrentProcess()->GetTitleID(); | ||
| 1412 | |||
| 1413 | FileSys::PatchManager pm{title_id}; | ||
| 1414 | auto res = pm.GetControlMetadata(); | ||
| 1415 | if (res.first != nullptr) { | ||
| 1416 | return res; | ||
| 1417 | } | ||
| 1418 | |||
| 1419 | FileSys::PatchManager pm_update{FileSys::GetUpdateTitleID(title_id)}; | ||
| 1420 | return pm_update.GetControlMetadata(); | ||
| 1421 | }(); | ||
| 1422 | |||
| 1411 | if (res.first != nullptr) { | 1423 | if (res.first != nullptr) { |
| 1412 | supported_languages = res.first->GetSupportedLanguages(); | 1424 | supported_languages = res.first->GetSupportedLanguages(); |
| 1413 | } | 1425 | } |