mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-26 05:50:07 +02:00
29 lines
628 B
C#
29 lines
628 B
C#
using Ryujinx.Common.Logging;
|
|
using Ryujinx.HLE.HOS.Tamper.Operations;
|
|
|
|
namespace Ryujinx.HLE.HOS.Tamper
|
|
{
|
|
class Register : IOperand
|
|
{
|
|
private ulong _register = 0;
|
|
private readonly 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;
|
|
}
|
|
}
|
|
}
|