diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2024-08-05 11:00:41 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-05 11:00:41 -0300 |
| commit | 4a4b11871e362016b41c56d4dd4654ade0b894e0 (patch) | |
| tree | c8cafe8f577411b371550c06d2ea03625586fd35 /src/Ryujinx.Memory/Range/MultiRangeList.cs | |
| parent | e85ee673b10da5a314e68cea88caeacd2918f311 (diff) | |
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>
Diffstat (limited to 'src/Ryujinx.Memory/Range/MultiRangeList.cs')
| -rw-r--r-- | src/Ryujinx.Memory/Range/MultiRangeList.cs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/Ryujinx.Memory/Range/MultiRangeList.cs b/src/Ryujinx.Memory/Range/MultiRangeList.cs index 1804ff5c..c3c6ae79 100644 --- a/src/Ryujinx.Memory/Range/MultiRangeList.cs +++ b/src/Ryujinx.Memory/Range/MultiRangeList.cs @@ -30,7 +30,7 @@ namespace Ryujinx.Memory.Range { var subrange = range.GetSubRange(i); - if (IsInvalid(ref subrange)) + if (MemoryRange.IsInvalid(ref subrange)) { continue; } @@ -56,7 +56,7 @@ namespace Ryujinx.Memory.Range { var subrange = range.GetSubRange(i); - if (IsInvalid(ref subrange)) + if (MemoryRange.IsInvalid(ref subrange)) { continue; } @@ -99,7 +99,7 @@ namespace Ryujinx.Memory.Range { var subrange = range.GetSubRange(i); - if (IsInvalid(ref subrange)) + if (MemoryRange.IsInvalid(ref subrange)) { continue; } @@ -143,17 +143,6 @@ namespace Ryujinx.Memory.Range } /// <summary> - /// Checks if a given sub-range of memory is invalid. - /// Those are used to represent unmapped memory regions (holes in the region mapping). - /// </summary> - /// <param name="subRange">Memory range to checl</param> - /// <returns>True if the memory range is considered invalid, false otherwise</returns> - private static bool IsInvalid(ref MemoryRange subRange) - { - return subRange.Address == ulong.MaxValue; - } - - /// <summary> /// Gets all items on the list starting at the specified memory address. /// </summary> /// <param name="baseAddress">Base address to find</param> |
