mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-31 13:07:10 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
32
src/Ryujinx.HLE/HOS/Tamper/Pointer.cs
Normal file
32
src/Ryujinx.HLE/HOS/Tamper/Pointer.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Tamper.Operations;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Tamper
|
||||
{
|
||||
class Pointer : IOperand
|
||||
{
|
||||
private IOperand _position;
|
||||
private ITamperedProcess _process;
|
||||
|
||||
public Pointer(IOperand position, ITamperedProcess process)
|
||||
{
|
||||
_position = position;
|
||||
_process = process;
|
||||
}
|
||||
|
||||
public T Get<T>() where T : unmanaged
|
||||
{
|
||||
return _process.ReadMemory<T>(_position.Get<ulong>());
|
||||
}
|
||||
|
||||
public void Set<T>(T value) where T : unmanaged
|
||||
{
|
||||
ulong position = _position.Get<ulong>();
|
||||
|
||||
Logger.Debug?.Print(LogClass.TamperMachine, $"0x{position:X16}@{Unsafe.SizeOf<T>()}: {value:X}");
|
||||
|
||||
_process.WriteMemory(position, value);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue