mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-10 07:41:44 +01:00
eee639d6ba
* .NET Core 3.0 is here! * Remove IMemoryManager.cs and its references. * Add T Math/F.FusedMultiplyAdd(T, T, T). Nits. * Nit. * Update appveyor.yml * Revert "Resolve Visual Studio build issues" This reverts commit 1772128ce0fc058e6280001aace3a77a7a96897b. * Update SvcTable.cs
26 lines
557 B
C#
26 lines
557 B
C#
using ARMeilleure.Memory;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.HLE.Utilities
|
|
{
|
|
class StructWriter
|
|
{
|
|
private MemoryManager _memory;
|
|
|
|
public long Position { get; private set; }
|
|
|
|
public StructWriter(MemoryManager memory, long position)
|
|
{
|
|
_memory = memory;
|
|
Position = position;
|
|
}
|
|
|
|
public void Write<T>(T value) where T : struct
|
|
{
|
|
MemoryHelper.Write(_memory, Position, value);
|
|
|
|
Position += Marshal.SizeOf<T>();
|
|
}
|
|
}
|
|
}
|