1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-16 20:36:38 +00:00
Ryujinx/Ryujinx.HLE/HOS/Tamper/Register.cs

29 lines
619 B
C#
Raw Normal View History

using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Tamper.Operations;
namespace Ryujinx.HLE.HOS.Tamper
{
class Register : IOperand
{
private ulong _register = 0;
private string _alias;
public Register(string alias)
{
_alias = alias;
}
public T Get<T>() where T : unmanaged
{
return (T)(dynamic)_register;
}
public void Set<T>(T value) where T : unmanaged
{
Logger.Debug?.Print(LogClass.TamperMachine, $"{_alias}: {value}");
_register = (ulong)(dynamic)value;
}
}
}