aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Cpu
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-12-12 00:06:20 -0300
committerGitHub <noreply@github.com>2020-12-12 14:06:20 +1100
commit74aa7b20be5ef924f3e8cbde699fcf4f8431f750 (patch)
tree173851ac0907333cf4b62467b1763fdbf9c8816a /Ryujinx.Cpu
parent06057a99a653b83389447a9c56d926c463317b47 (diff)
Rewrite size for fixed size buffers (#1808)
Diffstat (limited to 'Ryujinx.Cpu')
-rw-r--r--Ryujinx.Cpu/MemoryHelper.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Cpu/MemoryHelper.cs b/Ryujinx.Cpu/MemoryHelper.cs
index 8ef4bc66..7c400e91 100644
--- a/Ryujinx.Cpu/MemoryHelper.cs
+++ b/Ryujinx.Cpu/MemoryHelper.cs
@@ -37,7 +37,7 @@ namespace Ryujinx.Cpu
}
}
- public unsafe static void Write<T>(IVirtualMemoryManager memory, long position, T value) where T : struct
+ public unsafe static long Write<T>(IVirtualMemoryManager memory, long position, T value) where T : struct
{
long size = Marshal.SizeOf<T>();
@@ -49,6 +49,8 @@ namespace Ryujinx.Cpu
}
memory.Write((ulong)position, data);
+
+ return size;
}
public static string ReadAsciiString(IVirtualMemoryManager memory, long position, long maxSize = -1)