Add Cheat Manager (#2964)

* add cheatmanager

* use modloader to load cheats for manager

* addressed nits
This commit is contained in:
Emmanuel Hansen
2022-01-03 08:39:43 +00:00
committed by GitHub
parent dc8a1d5cba
commit e98abf1820
12 changed files with 388 additions and 13 deletions

View File

@ -11,6 +11,7 @@ namespace Ryujinx.HLE.HOS.Tamper
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)
{
@ -22,8 +23,11 @@ namespace Ryujinx.HLE.HOS.Tamper
public void Execute(ControllerKeys pressedKeys)
{
_pressedKeys.Value = (long)pressedKeys;
_entryPoint.Execute();
if (IsEnabled)
{
_pressedKeys.Value = (long)pressedKeys;
_entryPoint.Execute();
}
}
}
}