1
1
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2025-03-13 02:39:39 -05:00
ryujinx/src/Ryujinx.Memory/Range/IMultiRangeItem.cs
gdkchan 4a4b11871e
Fix same textures with unmapped start being considered different (#7141)
* Fix same textures with unmapped start being considered different

* Consolidate IsInvalid check

* InvalidAddress const

* Fix typo

Co-authored-by: riperiperi <rhy3756547@hotmail.com>

---------

Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2024-08-05 11:00:41 -03:00

26 lines
588 B
C#

namespace Ryujinx.Memory.Range
{
public interface IMultiRangeItem
{
MultiRange Range { get; }
ulong BaseAddress
{
get
{
for (int index = 0; index < Range.Count; index++)
{
MemoryRange subRange = Range.GetSubRange(index);
if (!MemoryRange.IsInvalid(ref subRange))
{
return subRange.Address;
}
}
return MemoryRange.InvalidAddress;
}
}
}
}