aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Arp
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2021-12-23 09:55:50 -0700
committerGitHub <noreply@github.com>2021-12-23 13:55:50 -0300
commitaa932a6df1764b7c600ae0ba4e0c7a0ba802f312 (patch)
tree24a390cf2330620aeeab1efbd42ae4099f61ca86 /Ryujinx.HLE/HOS/Services/Arp
parentcb43cc7e322014ce2bd0ee73b06d403be62fa8d5 (diff)
Update to LibHac v0.14.3 (#2925)
* Update to LibHac v0.14.3 * Fix loading NCAs that don't have a data partition
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Arp')
-rw-r--r--Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs b/Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs
index d36ec590..985dcdec 100644
--- a/Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs
+++ b/Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs
@@ -1,4 +1,5 @@
using LibHac;
+using LibHac.Common;
using LibHac.Ncm;
using LibHac.Ns;
using System;
@@ -22,6 +23,8 @@ namespace Ryujinx.HLE.HOS.Services.Arp
return Result.Success;
}
+ public void Dispose() { }
+
public Result GetApplicationLaunchPropertyWithApplicationId(out LibHac.Arp.ApplicationLaunchProperty launchProperty, ApplicationId applicationId)
{
launchProperty = new LibHac.Arp.ApplicationLaunchProperty
@@ -51,16 +54,21 @@ namespace Ryujinx.HLE.HOS.Services.Arp
internal class LibHacArpServiceObject : LibHac.Sm.IServiceObject
{
- private LibHacIReader _serviceObject;
+ private SharedRef<LibHacIReader> _serviceObject;
- public LibHacArpServiceObject(LibHacIReader serviceObject)
+ public LibHacArpServiceObject(ref SharedRef<LibHacIReader> serviceObject)
{
- _serviceObject = serviceObject;
+ _serviceObject = SharedRef<LibHacIReader>.CreateCopy(in serviceObject);
}
- public Result GetServiceObject(out object serviceObject)
+ public void Dispose()
+ {
+ _serviceObject.Destroy();
+ }
+
+ public Result GetServiceObject(ref SharedRef<IDisposable> serviceObject)
{
- serviceObject = _serviceObject;
+ serviceObject.SetByCopy(in _serviceObject);
return Result.Success;
}