aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Horizon.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2020-04-29 21:58:19 -0700
committerGitHub <noreply@github.com>2020-04-30 14:58:19 +1000
commit7ab3fccd4d13bf3ed07a7fa207cfee61b43c56f3 (patch)
tree744caac5f15b69f1c411c0dc4f491f9f56a57278 /Ryujinx.HLE/HOS/Horizon.cs
parent23170da5a0092c2a9d2d5d0b49da5ee1f53637ac (diff)
Add BCAT delivery cache support (#1154)
* Initial bcat delivery cache support * Use LibHac 0.11.0 * Add option to open the BCAT savedata directory
Diffstat (limited to 'Ryujinx.HLE/HOS/Horizon.cs')
-rw-r--r--Ryujinx.HLE/HOS/Horizon.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs
index 79fef93d..2dfa2757 100644
--- a/Ryujinx.HLE/HOS/Horizon.cs
+++ b/Ryujinx.HLE/HOS/Horizon.cs
@@ -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)