Fix GetWritableRegion write-back (#2456)
This commit is contained in:
parent
59900d7f00
commit
b1a9d17cf8
@ -66,7 +66,9 @@ namespace Ryujinx.Memory
|
|||||||
{
|
{
|
||||||
int copySize = (int)Math.Min(MaxChunkSize, size - subOffset);
|
int copySize = (int)Math.Min(MaxChunkSize, size - subOffset);
|
||||||
|
|
||||||
GetWritableRegion(va + subOffset, copySize).Memory.Span.Fill(0);
|
using var writableRegion = GetWritableRegion(va + subOffset, copySize);
|
||||||
|
|
||||||
|
writableRegion.Memory.Span.Fill(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ namespace Ryujinx.Memory
|
|||||||
/// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception>
|
/// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception>
|
||||||
public WritableRegion GetWritableRegion(ulong offset, int size)
|
public WritableRegion GetWritableRegion(ulong offset, int size)
|
||||||
{
|
{
|
||||||
return new WritableRegion(this, offset, GetMemory(offset, size));
|
return new WritableRegion(null, offset, GetMemory(offset, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user