Implement dlc management window (#1313)

* Implement dlc management window

* reduce repetition

* Implement per NCA toggling of DLC rather than per container
This commit is contained in:
Xpl0itR 2020-06-23 01:32:07 +01:00 committed by GitHub
parent fcd187ce42
commit 2ed9db1fcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 581 additions and 164 deletions

View file

@ -4,7 +4,6 @@ using LibHac.Fs;
using LibHac.FsSystem;
using LibHac.FsSystem.NcaUtils;
using LibHac.Ncm;
using LibHac.Spl;
using Ryujinx.Common.Logging;
using Ryujinx.HLE.Exceptions;
using Ryujinx.HLE.HOS.Services.Time;
@ -241,6 +240,18 @@ namespace Ryujinx.HLE.FileSystem.Content
}
}
public void AddAocItem(ulong titleId, string containerPath, string ncaPath, bool enabled)
{
if (!_aocData.TryAdd(titleId, new AocItem(containerPath, ncaPath, enabled)))
{
Logger.PrintWarning(LogClass.Application, $"Duplicate AddOnContent detected. TitleId {titleId:X16}");
}
else
{
Logger.PrintInfo(LogClass.Application, $"Found AddOnContent with TitleId {titleId:X16}");
}
}
public void ClearAocData() => _aocData.Clear();
public int GetAocCount() => _aocData.Where(e => e.Value.Enabled).Count();