Kaynağa Gözat

[ci skip] UI: Strip dumped file information out of the DLC name

Evan Husted 1 yıl önce
ebeveyn
işleme
820e8f7375

+ 8 - 3
src/Ryujinx/Utilities/AppLibrary/ApplicationLibrary.cs

@@ -128,11 +128,16 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
             DynamicData.Kernel.Optional<ApplicationData> appData = Applications.Lookup(id);
             if (appData.HasValue)
                 return appData.Value.Name;
+
+            if (!DownloadableContents.Keys.FindFirst(x => x.TitleId == id).TryGet(out DownloadableContentModel dlcData))
+                return id.ToString("X16");
             
-            if (DownloadableContents.Keys.FindFirst(x => x.TitleId == id).TryGet(out DownloadableContentModel dlcData))
-                return Path.GetFileNameWithoutExtension(dlcData.FileName);
+            string name = Path.GetFileNameWithoutExtension(dlcData.FileName)!;
+            int idx = name.IndexOf('[');
+            if (idx != -1)
+                name = name[..idx];
 
-            return id.ToString("X16");
+            return name;
         }
 
         public bool FindApplication(ulong id, out ApplicationData foundData)