summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-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) {
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 }