aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs
index 6a78cdfe..d000635d 100644
--- a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs
+++ b/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs
@@ -6,47 +6,47 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{
class IStorage : IpcService
{
- private Dictionary<int, ServiceProcessRequest> m_Commands;
+ private Dictionary<int, ServiceProcessRequest> _commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
- private Stream BaseStream;
+ private Stream _baseStream;
- public IStorage(Stream BaseStream)
+ public IStorage(Stream baseStream)
{
- m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ _commands = new Dictionary<int, ServiceProcessRequest>
{
{ 0, Read }
};
- this.BaseStream = BaseStream;
+ _baseStream = baseStream;
}
// Read(u64 offset, u64 length) -> buffer<u8, 0x46, 0> buffer
- public long Read(ServiceCtx Context)
+ public long Read(ServiceCtx context)
{
- long Offset = Context.RequestData.ReadInt64();
- long Size = Context.RequestData.ReadInt64();
+ long offset = context.RequestData.ReadInt64();
+ long size = context.RequestData.ReadInt64();
- if (Context.Request.ReceiveBuff.Count > 0)
+ if (context.Request.ReceiveBuff.Count > 0)
{
- IpcBuffDesc BuffDesc = Context.Request.ReceiveBuff[0];
+ IpcBuffDesc buffDesc = context.Request.ReceiveBuff[0];
//Use smaller length to avoid overflows.
- if (Size > BuffDesc.Size)
+ if (size > buffDesc.Size)
{
- Size = BuffDesc.Size;
+ size = buffDesc.Size;
}
- byte[] Data = new byte[Size];
+ byte[] data = new byte[size];
- lock (BaseStream)
+ lock (_baseStream)
{
- BaseStream.Seek(Offset, SeekOrigin.Begin);
- BaseStream.Read(Data, 0, Data.Length);
+ _baseStream.Seek(offset, SeekOrigin.Begin);
+ _baseStream.Read(data, 0, data.Length);
}
- Context.Memory.WriteBytes(BuffDesc.Position, Data);
+ context.Memory.WriteBytes(buffDesc.Position, data);
}
return 0;