aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs
index f5cecdbb..8de3f726 100644
--- a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs
+++ b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs
@@ -401,7 +401,11 @@ namespace Ryujinx.HLE.HOS.Services.Time
{
Debug.Assert(ipcDesc.Size == Marshal.SizeOf<ClockSnapshot>());
- using (BinaryReader bufferReader = new BinaryReader(new MemoryStream(context.Memory.ReadBytes(ipcDesc.Position, ipcDesc.Size))))
+ byte[] temp = new byte[ipcDesc.Size];
+
+ context.Memory.Read((ulong)ipcDesc.Position, temp);
+
+ using (BinaryReader bufferReader = new BinaryReader(new MemoryStream(temp)))
{
return bufferReader.ReadStruct<ClockSnapshot>();
}
@@ -418,7 +422,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
bufferWriter.WriteStruct(clockSnapshot);
}
- context.Memory.WriteBytes(ipcDesc.Position, memory.ToArray());
+ context.Memory.Write((ulong)ipcDesc.Position, memory.ToArray());
memory.Dispose();
}
}