mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-18 19:16:40 +00:00
25 lines
469 B
C#
25 lines
469 B
C#
|
using Ryujinx.HLE.HOS.Tamper.Operations;
|
||
|
|
||
|
namespace Ryujinx.HLE.HOS.Tamper
|
||
|
{
|
||
|
class Value<P> : IOperand where P : unmanaged
|
||
|
{
|
||
|
private P _value;
|
||
|
|
||
|
public Value(P value)
|
||
|
{
|
||
|
_value = value;
|
||
|
}
|
||
|
|
||
|
public T Get<T>() where T : unmanaged
|
||
|
{
|
||
|
return (T)(dynamic)_value;
|
||
|
}
|
||
|
|
||
|
public void Set<T>(T value) where T : unmanaged
|
||
|
{
|
||
|
_value = (P)(dynamic)value;
|
||
|
}
|
||
|
}
|
||
|
}
|