Rewrite size for fixed size buffers (#1808)
This commit is contained in:
parent
06057a99a6
commit
74aa7b20be
7 changed files with 26 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue