Procházet zdrojové kódy

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

CrazyMax před 6 roky
rodič
revize
cf76769026
1 změnil soubory, kde provedl 13 přidání a 1 odebrání
  1. 13 1
      src/core/hle/service/am/am.cpp

+ 13 - 1
src/core/hle/service/am/am.cpp

@@ -1389,7 +1389,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();
     }