aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Fs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs12
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs12
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs9
3 files changed, 12 insertions, 21 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs
index 681b6c17..cf1611e7 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs
@@ -1,10 +1,9 @@
using LibHac;
using LibHac.Fs;
-using System;
namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
{
- class IFile : IpcService, IDisposable
+ class IFile : DisposableIpcService
{
private LibHac.Fs.Fsa.IFile _baseFile;
@@ -82,14 +81,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
return (ResultCode)result.Value;
}
- public void Dispose()
+ protected override void Dispose(bool isDisposing)
{
- Dispose(true);
- }
-
- protected virtual void Dispose(bool disposing)
- {
- if (disposing)
+ if (isDisposing)
{
_baseFile?.Dispose();
}
diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
index 89955634..62a3c62a 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
@@ -1,10 +1,9 @@
using LibHac;
using Ryujinx.HLE.HOS.Ipc;
-using System;
namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
{
- class IStorage : IpcService, IDisposable
+ class IStorage : DisposableIpcService
{
private LibHac.Fs.IStorage _baseStorage;
@@ -53,14 +52,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
return (ResultCode)result.Value;
}
- public void Dispose()
+ protected override void Dispose(bool isDisposing)
{
- Dispose(true);
- }
-
- protected virtual void Dispose(bool disposing)
- {
- if (disposing)
+ if (isDisposing)
{
_baseStorage?.Dispose();
}
diff --git a/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs b/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs
index d6449a2d..bc4a2eb9 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs
@@ -3,7 +3,7 @@ using LibHac;
namespace Ryujinx.HLE.HOS.Services.Fs
{
- class ISaveDataInfoReader : IpcService, IDisposable
+ class ISaveDataInfoReader : DisposableIpcService
{
private ReferenceCountedDisposable<LibHac.FsSrv.ISaveDataInfoReader> _baseReader;
@@ -29,9 +29,12 @@ namespace Ryujinx.HLE.HOS.Services.Fs
return (ResultCode)result.Value;
}
- public void Dispose()
+ protected override void Dispose(bool isDisposing)
{
- _baseReader.Dispose();
+ if (isDisposing)
+ {
+ _baseReader?.Dispose();
+ }
}
}
}