aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/Range/IMultiRangeItem.cs
blob: 5f9611c75869c61268030e1f2277184180c6d846 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
            }
        }
    }
}