Explorar o código

HLE: TryAdd firmware NCAs

Evan Husted hai 1 ano
pai
achega
9c8055440e
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/Ryujinx.HLE/FileSystem/ContentManager.cs

+ 2 - 4
src/Ryujinx.HLE/FileSystem/ContentManager.cs

@@ -710,9 +710,8 @@ namespace Ryujinx.HLE.FileSystem
                         {
                             updateNcasItem.Add((nca.Header.ContentType, entry.FullName));
                         }
-                        else
+                        else if (updateNcas.TryAdd(nca.Header.TitleId, new List<(NcaContentType, string)>()))
                         {
-                            updateNcas.Add(nca.Header.TitleId, new List<(NcaContentType, string)>());
                             updateNcas[nca.Header.TitleId].Add((nca.Header.ContentType, entry.FullName));
                         }
                     }
@@ -898,9 +897,8 @@ namespace Ryujinx.HLE.FileSystem
                     {
                         updateNcasItem.Add((nca.Header.ContentType, entry.FullPath));
                     }
-                    else
+                    else if (updateNcas.TryAdd(nca.Header.TitleId, new List<(NcaContentType, string)>()))
                     {
-                        updateNcas.Add(nca.Header.TitleId, new List<(NcaContentType, string)>());
                         updateNcas[nca.Header.TitleId].Add((nca.Header.ContentType, entry.FullPath));
                     }