CpuRegionHandle.cs 884 B

123456789101112131415161718192021222324252627
  1. using Ryujinx.Memory.Tracking;
  2. using System;
  3. namespace Ryujinx.Cpu.Tracking
  4. {
  5. public class CpuRegionHandle : IRegionHandle
  6. {
  7. private readonly RegionHandle _impl;
  8. public bool Dirty => _impl.Dirty;
  9. public ulong Address => _impl.Address;
  10. public ulong Size => _impl.Size;
  11. public ulong EndAddress => _impl.EndAddress;
  12. internal CpuRegionHandle(RegionHandle impl)
  13. {
  14. _impl = impl;
  15. }
  16. public void Dispose() => _impl.Dispose();
  17. public void RegisterAction(RegionSignal action) => _impl.RegisterAction(action);
  18. public void RegisterDirtyEvent(Action action) => _impl.RegisterDirtyEvent(action);
  19. public void Reprotect(bool asDirty = false) => _impl.Reprotect(asDirty);
  20. public bool OverlapsWith(ulong address, ulong size) => _impl.OverlapsWith(address, size);
  21. }
  22. }