AtmosphereProgram.cs 713 B

1234567891011121314151617181920212223242526
  1. using Ryujinx.HLE.HOS.Services.Hid;
  2. using Ryujinx.HLE.HOS.Tamper.Operations;
  3. namespace Ryujinx.HLE.HOS.Tamper
  4. {
  5. class AtmosphereProgram : ITamperProgram
  6. {
  7. private Parameter<long> _pressedKeys;
  8. private IOperation _entryPoint;
  9. public ITamperedProcess Process { get; }
  10. public AtmosphereProgram(ITamperedProcess process, Parameter<long> pressedKeys, IOperation entryPoint)
  11. {
  12. Process = process;
  13. _pressedKeys = pressedKeys;
  14. _entryPoint = entryPoint;
  15. }
  16. public void Execute(ControllerKeys pressedKeys)
  17. {
  18. _pressedKeys.Value = (long)pressedKeys;
  19. _entryPoint.Execute();
  20. }
  21. }
  22. }