Przeglądaj źródła

Fix IsRegionInUse check on NV memory allocator (#2243)

gdkchan 5 lat temu
rodzic
commit
992133e9ca
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs

+ 2 - 3
Ryujinx.HLE/HOS/Services/Nv/NvMemoryAllocator.cs

@@ -1,6 +1,5 @@
 using Ryujinx.Common.Collections;
 using System.Collections.Generic;
-using Ryujinx.Common;
 using System;
 using Ryujinx.Graphics.Gpu.Memory;
 using Ryujinx.Common.Logging;
@@ -198,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices
                 {
                     bool reachedEndOfAddresses = false;
                     ulong targetAddress;
-                    if(start == DefaultStart)
+                    if (start == DefaultStart)
                     {
                         Logger.Debug?.Print(LogClass.ServiceNv, $"Target address set to start of the last available range: 0x{_list.Last.Value:X}.");
                         targetAddress = _list.Last.Value;
@@ -301,7 +300,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices
                 freeAddressStartPosition = floorAddress;
                 if (floorAddress != InvalidAddress)
                 {
-                    return !(gpuVa >= floorAddress && ((gpuVa + size) < _tree.Get(floorAddress)));
+                    return !(gpuVa >= floorAddress && ((gpuVa + size) <= _tree.Get(floorAddress)));
                 }
             }
             return true;