diff options
Diffstat (limited to 'Ryujinx.HLE/DeviceMemory.cs')
-rw-r--r-- | Ryujinx.HLE/DeviceMemory.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Ryujinx.HLE/DeviceMemory.cs b/Ryujinx.HLE/DeviceMemory.cs index 0ead1747..38864bc2 100644 --- a/Ryujinx.HLE/DeviceMemory.cs +++ b/Ryujinx.HLE/DeviceMemory.cs @@ -59,6 +59,11 @@ namespace Ryujinx.HLE return *((ulong*)(_ramPtr + position)); } + public unsafe T ReadStruct<T>(long position) + { + return Marshal.PtrToStructure<T>((IntPtr)(_ramPtr + position)); + } + public void WriteSByte(long position, sbyte value) { WriteByte(position, (byte)value); |