mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-09-01 13:56:27 -05:00
Refactor out Application details from Horizon (#1236)
* Initial Application refactor * Misc typo and access modifier fixes * Clean unused namespaces * Address gdkchan's comments * Move ticket reading to common method * Change IParentalControlService to use ApplicationLoader.ControlData
This commit is contained in:
@@ -474,17 +474,7 @@ namespace Ryujinx.Ui
|
||||
Nca controlNca = null;
|
||||
|
||||
// Add keys to key set if needed
|
||||
foreach (DirectoryEntryEx ticketEntry in pfs.EnumerateEntries("/", "*.tik"))
|
||||
{
|
||||
Result result = pfs.OpenFile(out IFile ticketFile, ticketEntry.FullPath.ToU8Span(), OpenMode.Read);
|
||||
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
Ticket ticket = new Ticket(ticketFile.AsStream());
|
||||
|
||||
_virtualFileSystem.KeySet.ExternalKeySet.Add(new RightsId(ticket.RightsId), new AccessKey(ticket.GetTitleKey(_virtualFileSystem.KeySet)));
|
||||
}
|
||||
}
|
||||
_virtualFileSystem.ImportTickets(pfs);
|
||||
|
||||
// Find the Control NCA and store it in variable called controlNca
|
||||
foreach (DirectoryEntryEx fileEntry in pfs.EnumerateEntries("/", "*.nca"))
|
||||
@@ -661,17 +651,7 @@ namespace Ryujinx.Ui
|
||||
{
|
||||
PartitionFileSystem nsp = new PartitionFileSystem(file.AsStorage());
|
||||
|
||||
foreach (DirectoryEntryEx ticketEntry in nsp.EnumerateEntries("/", "*.tik"))
|
||||
{
|
||||
Result result = nsp.OpenFile(out IFile ticketFile, ticketEntry.FullPath.ToU8Span(), OpenMode.Read);
|
||||
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
Ticket ticket = new Ticket(ticketFile.AsStream());
|
||||
|
||||
_virtualFileSystem.KeySet.ExternalKeySet.Add(new RightsId(ticket.RightsId), new AccessKey(ticket.GetTitleKey(_virtualFileSystem.KeySet)));
|
||||
}
|
||||
}
|
||||
_virtualFileSystem.ImportTickets(nsp);
|
||||
|
||||
foreach (DirectoryEntryEx fileEntry in nsp.EnumerateEntries("/", "*.nca"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user