mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-30 12:37:11 +02:00
Make use of Random.Shared (#3852)
This commit is contained in:
parent
3d45595b41
commit
65d690d9f7
4 changed files with 4 additions and 7 deletions
|
@ -32,8 +32,6 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
private KProcess _owner;
|
||||
private IVirtualMemoryManager _ownerMm;
|
||||
|
||||
private static Random _random = new Random();
|
||||
|
||||
public IRoInterface(ServiceCtx context)
|
||||
{
|
||||
_nrrInfos = new List<NrrInfo>(MaxNrr);
|
||||
|
@ -283,7 +281,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
{
|
||||
while (true)
|
||||
{
|
||||
ulong randomOffset = (ulong)(uint)_random.Next(0, (int)addressSpacePageLimit) << 12;
|
||||
ulong randomOffset = (ulong)(uint)Random.Shared.Next(0, (int)addressSpacePageLimit) << 12;
|
||||
|
||||
targetAddress = memMgr.GetAddrSpaceBaseAddr() + randomOffset;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue