mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-22 05:05:47 +00:00
@@ -23,7 +23,6 @@ namespace Ryujinx.Memory.Tracking
|
||||
/// <param name="modifiedAction">Action to perform for modified regions</param>
|
||||
void QueryModified(Action<ulong, ulong> modifiedAction);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Check if part of the region has been modified within a given range, and perform an action for each.
|
||||
/// The range is aligned to the level of granularity of the contained handles.
|
||||
|
||||
@@ -282,6 +282,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
modifiedAction(rgStart, rgSize);
|
||||
rgSize = 0;
|
||||
}
|
||||
|
||||
rgStart = handle.RealAddress;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
InitializeRegions();
|
||||
}
|
||||
|
||||
private List<VirtualRegion> GetGuestRegions(MemoryTracking tracking, ulong address, ulong size, RegionFlags flags)
|
||||
private static List<VirtualRegion> GetGuestRegions(MemoryTracking tracking, ulong address, ulong size, RegionFlags flags)
|
||||
{
|
||||
ulong guestAddress;
|
||||
ulong guestSize;
|
||||
@@ -305,6 +305,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
{
|
||||
OnDirty?.Invoke();
|
||||
}
|
||||
|
||||
Parent?.SignalWrite();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
{
|
||||
splitLow.RegisterAction(signal);
|
||||
}
|
||||
|
||||
_handles[handleIndex] = splitLow;
|
||||
|
||||
RegionHandle splitHigh = _tracking.BeginTracking(address + size, handle.Size - size, _id);
|
||||
@@ -118,6 +119,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
{
|
||||
splitHigh.RegisterAction(signal);
|
||||
}
|
||||
|
||||
_handles[splitIndex] = splitHigh;
|
||||
}
|
||||
|
||||
@@ -136,6 +138,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
SplitHandle(i, startHandle);
|
||||
return; // The remainer of this handle should be filled in later on.
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -201,6 +204,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
modifiedAction(rgStart, rgSize);
|
||||
rgSize = 0;
|
||||
}
|
||||
|
||||
rgStart = handle.EndAddress;
|
||||
}
|
||||
|
||||
@@ -255,6 +259,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
modifiedAction(rgStart, rgSize);
|
||||
rgSize = 0;
|
||||
}
|
||||
|
||||
rgStart = handle.EndAddress;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -142,7 +143,7 @@ namespace Ryujinx.Memory.Tracking
|
||||
Size = splitAddress - Address;
|
||||
|
||||
// The new region inherits all of our parents.
|
||||
newRegion.Handles = new List<RegionHandle>(Handles);
|
||||
newRegion.Handles = [.. Handles];
|
||||
foreach (RegionHandle parent in Handles)
|
||||
{
|
||||
parent.AddChild(newRegion);
|
||||
|
||||
@@ -400,6 +400,5 @@ namespace Ryujinx.Memory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user