diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs b/Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs index 62e118d9..0f38e685 100644 --- a/Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Spl/IRandomInterface.cs @@ -4,10 +4,12 @@ using System.Security.Cryptography; namespace Ryujinx.HLE.HOS.Services.Spl { [Service("csrng")] - class IRandomInterface : IpcService, IDisposable + class IRandomInterface : DisposableIpcService { private RNGCryptoServiceProvider _rng; + private object _lock = new object(); + public IRandomInterface(ServiceCtx context) { _rng = new RNGCryptoServiceProvider(); @@ -26,14 +28,9 @@ namespace Ryujinx.HLE.HOS.Services.Spl return ResultCode.Success; } - public void Dispose() - { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) + protected override void Dispose(bool isDisposing) { - if (disposing) + if (isDisposing) { _rng.Dispose(); } |