Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev 2025-05-30 17:08:34 -05:00 committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View file

@ -400,6 +400,8 @@ namespace Ryujinx.Tests.Memory
Assert.AreEqual(singlePages[2], combinedHandles.ElementAt(10));
}
static readonly bool[] _expectedPagesModified = [true, false, false];
[Test]
public void PreciseAction()
{
@ -409,7 +411,11 @@ namespace Ryujinx.Tests.Memory
PreparePages(granular, 3, PageSize * 3);
// Add a precise action to the second and third handle in the multiregion.
granular.RegisterPreciseAction(PageSize * 4, PageSize * 2, (_, _, _) => { actionTriggered = true; return true; });
granular.RegisterPreciseAction(PageSize * 4, PageSize * 2, (_, _, _) =>
{
actionTriggered = true;
return true;
});
// Precise write to first handle in the multiregion.
_tracking.VirtualMemoryEvent(PageSize * 3, PageSize, true, precise: true);
@ -433,7 +439,7 @@ namespace Ryujinx.Tests.Memory
Assert.IsTrue(actionTriggered); // Action triggered.
// Precise writes are ignored on two later handles due to the action returning true.
Assert.AreEqual(pagesModified, new bool[] { true, false, false });
Assert.AreEqual(pagesModified, _expectedPagesModified);
}
}
}

View file

@ -329,6 +329,7 @@ namespace Ryujinx.Tests.Memory
{
_tracking.VirtualMemoryEvent((ulong)random.Next(PageSize), 4, false);
}
Interlocked.Increment(ref signalThreadsDone);
});
}