Add BCAT delivery cache support (#1154)
* Initial bcat delivery cache support * Use LibHac 0.11.0 * Add option to open the BCAT savedata directory
This commit is contained in:
parent
23170da5a0
commit
7ab3fccd4d
9 changed files with 329 additions and 44 deletions
|
@ -1,5 +1,6 @@
|
|||
using LibHac;
|
||||
using LibHac.Account;
|
||||
using LibHac.Bcat;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs;
|
||||
using LibHac.FsSystem;
|
||||
|
@ -18,6 +19,7 @@ using Ryujinx.HLE.HOS.Kernel.Memory;
|
|||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy;
|
||||
using Ryujinx.HLE.HOS.Services.Arp;
|
||||
using Ryujinx.HLE.HOS.Services.Mii;
|
||||
using Ryujinx.HLE.HOS.Services.Nv;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl;
|
||||
|
@ -144,6 +146,9 @@ namespace Ryujinx.HLE.HOS
|
|||
|
||||
internal NvHostSyncpt HostSyncpoint { get; private set; }
|
||||
|
||||
internal LibHac.Horizon LibHacHorizonServer { get; private set; }
|
||||
internal HorizonClient LibHacHorizonClient { get; private set; }
|
||||
|
||||
public Horizon(Switch device, ContentManager contentManager)
|
||||
{
|
||||
ControlData = new BlitStruct<ApplicationControlProperty>(1);
|
||||
|
@ -280,6 +285,22 @@ namespace Ryujinx.HLE.HOS
|
|||
SurfaceFlinger = new SurfaceFlinger(device);
|
||||
|
||||
ConfigurationState.Instance.System.EnableDockedMode.Event += OnDockedModeChange;
|
||||
|
||||
InitLibHacHorizon();
|
||||
}
|
||||
|
||||
private void InitLibHacHorizon()
|
||||
{
|
||||
LibHac.Horizon horizon = new LibHac.Horizon(null, Device.FileSystem.FsServer);
|
||||
|
||||
horizon.CreateHorizonClient(out HorizonClient ryujinxClient).ThrowIfFailure();
|
||||
horizon.CreateHorizonClient(out HorizonClient bcatClient).ThrowIfFailure();
|
||||
|
||||
ryujinxClient.Sm.RegisterService(new LibHacIReader(this), "arp:r").ThrowIfFailure();
|
||||
new BcatServer(bcatClient);
|
||||
|
||||
LibHacHorizonServer = horizon;
|
||||
LibHacHorizonClient = ryujinxClient;
|
||||
}
|
||||
|
||||
private void OnDockedModeChange(object sender, ReactiveEventArgs<bool> e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue