From 51065d91290e41a9d2518f44c9bdf83a9b0017ab Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 11 Nov 2023 23:35:30 -0300 Subject: Revert "Add support for multi game XCIs (#5638)" (#5914) This reverts commit 5c3cfb84c09b0566da677425915afa0b2d76da55. --- src/Ryujinx.HLE/FileSystem/ContentCollection.cs | 61 ------------------------- 1 file changed, 61 deletions(-) delete mode 100644 src/Ryujinx.HLE/FileSystem/ContentCollection.cs (limited to 'src/Ryujinx.HLE/FileSystem/ContentCollection.cs') diff --git a/src/Ryujinx.HLE/FileSystem/ContentCollection.cs b/src/Ryujinx.HLE/FileSystem/ContentCollection.cs deleted file mode 100644 index 1c19887b..00000000 --- a/src/Ryujinx.HLE/FileSystem/ContentCollection.cs +++ /dev/null @@ -1,61 +0,0 @@ -using LibHac.Common.Keys; -using LibHac.Fs.Fsa; -using LibHac.Ncm; -using LibHac.Tools.FsSystem.NcaUtils; -using LibHac.Tools.Ncm; -using Ryujinx.HLE.Loaders.Processes.Extensions; -using System; - -namespace Ryujinx.HLE.FileSystem -{ - /// - /// Thin wrapper around - /// - public class ContentCollection - { - private readonly IFileSystem _pfs; - private readonly Cnmt _cnmt; - - public ulong Id => _cnmt.TitleId; - public TitleVersion Version => _cnmt.TitleVersion; - public ContentMetaType Type => _cnmt.Type; - public ulong ApplicationId => _cnmt.ApplicationTitleId; - public ulong PatchId => _cnmt.PatchTitleId; - public TitleVersion RequiredSystemVersion => _cnmt.MinimumSystemVersion; - public TitleVersion RequiredApplicationVersion => _cnmt.MinimumApplicationVersion; - public byte[] Digest => _cnmt.Hash; - - public ulong ProgramBaseId => Id & ~0x1FFFUL; - public bool IsSystemTitle => _cnmt.Type < ContentMetaType.Application; - - public ContentCollection(IFileSystem pfs, Cnmt cnmt) - { - _pfs = pfs; - _cnmt = cnmt; - } - - public Nca GetNcaByType(KeySet keySet, ContentType type, int programIndex = 0) - { - // TODO: Replace this with a check for IdOffset as soon as LibHac supports it: - // && entry.IdOffset == programIndex - - foreach (var entry in _cnmt.ContentEntries) - { - if (entry.Type != type) - { - continue; - } - - string ncaId = BitConverter.ToString(entry.NcaId).Replace("-", null).ToLower(); - Nca nca = _pfs.GetNca(keySet, $"/{ncaId}.nca"); - - if (nca.GetProgramIndex() == programIndex) - { - return nca; - } - } - - return null; - } - } -} -- cgit v1.2.3