mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-15 01:31:16 +01:00
e98abf1820
* add cheatmanager * use modloader to load cheats for manager * addressed nits
34 lines
955 B
C#
34 lines
955 B
C#
using Ryujinx.HLE.HOS.Services.Hid;
|
|
using Ryujinx.HLE.HOS.Tamper.Operations;
|
|
|
|
namespace Ryujinx.HLE.HOS.Tamper
|
|
{
|
|
class AtmosphereProgram : ITamperProgram
|
|
{
|
|
private Parameter<long> _pressedKeys;
|
|
private IOperation _entryPoint;
|
|
|
|
public string Name { get; }
|
|
public bool TampersCodeMemory { get; set; } = false;
|
|
public ITamperedProcess Process { get; }
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public AtmosphereProgram(string name, ITamperedProcess process, Parameter<long> pressedKeys, IOperation entryPoint)
|
|
{
|
|
Name = name;
|
|
Process = process;
|
|
_pressedKeys = pressedKeys;
|
|
_entryPoint = entryPoint;
|
|
}
|
|
|
|
public void Execute(ControllerKeys pressedKeys)
|
|
{
|
|
if (IsEnabled)
|
|
{
|
|
_pressedKeys.Value = (long)pressedKeys;
|
|
_entryPoint.Execute();
|
|
}
|
|
}
|
|
}
|
|
}
|