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 24cfb370b..32fad35f3 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1389,7 +1389,19 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
1389 u32 supported_languages = 0; 1389 u32 supported_languages = 0;
1390 FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()}; 1390 FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
1391 1391
1392 const auto res = pm.GetControlMetadata(); 1392 const auto res = [this] {
1393 const auto title_id = system.CurrentProcess()->GetTitleID();
1394
1395 FileSys::PatchManager pm{title_id};
1396 auto res = pm.GetControlMetadata();
1397 if (res.first != nullptr) {
1398 return res;
1399 }
1400
1401 FileSys::PatchManager pm_update{FileSys::GetUpdateTitleID(title_id)};
1402 return pm_update.GetControlMetadata();
1403 }();
1404
1393 if (res.first != nullptr) { 1405 if (res.first != nullptr) {
1394 supported_languages = res.first->GetSupportedLanguages(); 1406 supported_languages = res.first->GetSupportedLanguages();
1395 } 1407 }