diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Arp')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Arp/LibHacIReader.cs | 18 |
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; } |
