OpLog.cs 494 B

123456789101112131415161718192021
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Tamper.Operations
  3. {
  4. class OpLog<T> : IOperation where T : unmanaged
  5. {
  6. int _logId;
  7. IOperand _source;
  8. public OpLog(int logId, IOperand source)
  9. {
  10. _logId = logId;
  11. _source = source;
  12. }
  13. public void Execute()
  14. {
  15. Logger.Debug?.Print(LogClass.TamperMachine, $"Tamper debug log id={_logId} value={(dynamic)_source.Get<T>():X}");
  16. }
  17. }
  18. }