mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-01 15:56:32 -05:00
AM: fix GetDesiredLanguage:
try to get a control metadata from application update when is failed to get from the basic version. Tested on Kirby Star Allies
This commit is contained in:
parent
4e2464a713
commit
cf76769026
1 changed files with 13 additions and 1 deletions
|
@ -1389,7 +1389,19 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
||||||
u32 supported_languages = 0;
|
u32 supported_languages = 0;
|
||||||
FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
|
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) {
|
if (res.first != nullptr) {
|
||||||
supported_languages = res.first->GetSupportedLanguages();
|
supported_languages = res.first->GetSupportedLanguages();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue