mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 17:14:25 +00:00
misc: chore: Use collection expressions in HLE project
This commit is contained in:
parent
3c2f283ec7
commit
70b767ef60
@ -1072,7 +1072,7 @@ namespace Ryujinx.HLE.FileSystem
|
|||||||
|
|
||||||
public bool AreKeysAlredyPresent(string pathToCheck)
|
public bool AreKeysAlredyPresent(string pathToCheck)
|
||||||
{
|
{
|
||||||
string[] fileNames = { "prod.keys", "title.keys", "console.keys", "dev.keys" };
|
string[] fileNames = ["prod.keys", "title.keys", "console.keys", "dev.keys"];
|
||||||
foreach (string file in fileNames)
|
foreach (string file in fileNames)
|
||||||
{
|
{
|
||||||
if (File.Exists(Path.Combine(pathToCheck, file)))
|
if (File.Exists(Path.Combine(pathToCheck, file)))
|
||||||
|
@ -439,7 +439,7 @@ namespace Ryujinx.HLE.FileSystem
|
|||||||
|
|
||||||
U8Span mountName = "system".ToU8Span();
|
U8Span mountName = "system".ToU8Span();
|
||||||
DirectoryHandle handle = default;
|
DirectoryHandle handle = default;
|
||||||
List<ulong> localList = new();
|
List<ulong> localList = [];
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -39,10 +39,10 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
|||||||
|
|
||||||
if ((_commonArguments.AppletVersion >= 0x80000 && _shimKind == ShimKind.Web) || (_commonArguments.AppletVersion >= 0x30000 && _shimKind == ShimKind.Share))
|
if ((_commonArguments.AppletVersion >= 0x80000 && _shimKind == ShimKind.Web) || (_commonArguments.AppletVersion >= 0x30000 && _shimKind == ShimKind.Share))
|
||||||
{
|
{
|
||||||
List<BrowserOutput> result = new()
|
List<BrowserOutput> result =
|
||||||
{
|
[
|
||||||
new BrowserOutput(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton),
|
new BrowserOutput(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton)
|
||||||
};
|
];
|
||||||
|
|
||||||
_normalSession.Push(BuildResponseNew(result));
|
_normalSession.Push(BuildResponseNew(result));
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
|||||||
|
|
||||||
public static (ShimKind, List<BrowserArgument>) ParseArguments(ReadOnlySpan<byte> data)
|
public static (ShimKind, List<BrowserArgument>) ParseArguments(ReadOnlySpan<byte> data)
|
||||||
{
|
{
|
||||||
List<BrowserArgument> browserArguments = new();
|
List<BrowserArgument> browserArguments = [];
|
||||||
|
|
||||||
WebArgHeader header = IApplet.ReadStruct<WebArgHeader>(data[..8]);
|
WebArgHeader header = IApplet.ReadStruct<WebArgHeader>(data[..8]);
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
|||||||
string messageText = Encoding.ASCII.GetString(messageTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
string messageText = Encoding.ASCII.GetString(messageTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
||||||
string detailsText = Encoding.ASCII.GetString(detailsTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
string detailsText = Encoding.ASCII.GetString(detailsTextBuffer.TakeWhile(b => !b.Equals(0)).ToArray());
|
||||||
|
|
||||||
List<string> buttons = new();
|
List<string> buttons = [];
|
||||||
|
|
||||||
// TODO: Handle the LanguageCode to return the translated "OK" and "Details".
|
// TODO: Handle the LanguageCode to return the translated "OK" and "Details".
|
||||||
|
|
||||||
|
@ -122,13 +122,14 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
|||||||
{
|
{
|
||||||
// Try a list of fonts in case any of them is not available in the system.
|
// Try a list of fonts in case any of them is not available in the system.
|
||||||
|
|
||||||
string[] availableFonts = {
|
string[] availableFonts =
|
||||||
|
[
|
||||||
uiThemeFontFamily,
|
uiThemeFontFamily,
|
||||||
"Liberation Sans",
|
"Liberation Sans",
|
||||||
"FreeSans",
|
"FreeSans",
|
||||||
"DejaVu Sans",
|
"DejaVu Sans",
|
||||||
"Lucida Grande",
|
"Lucida Grande"
|
||||||
};
|
];
|
||||||
|
|
||||||
foreach (string fontFamily in availableFonts)
|
foreach (string fontFamily in availableFonts)
|
||||||
{
|
{
|
||||||
|
@ -9,10 +9,10 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
class Demangler
|
class Demangler
|
||||||
{
|
{
|
||||||
private const string Base36 = "0123456789abcdefghijklmnopqrstuvwxyz";
|
private const string Base36 = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||||
private readonly List<BaseNode> _substitutionList = new();
|
private readonly List<BaseNode> _substitutionList = [];
|
||||||
private List<BaseNode> _templateParamList = new();
|
private List<BaseNode> _templateParamList = [];
|
||||||
|
|
||||||
private readonly List<ForwardTemplateReference> _forwardTemplateReferenceList = new();
|
private readonly List<ForwardTemplateReference> _forwardTemplateReferenceList = [];
|
||||||
|
|
||||||
public string Mangled { get; private set; }
|
public string Mangled { get; private set; }
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
}
|
}
|
||||||
else if (ConsumeIf("Dw"))
|
else if (ConsumeIf("Dw"))
|
||||||
{
|
{
|
||||||
List<BaseNode> types = new();
|
List<BaseNode> types = [];
|
||||||
|
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
}
|
}
|
||||||
|
|
||||||
Reference referenceQualifier = Reference.None;
|
Reference referenceQualifier = Reference.None;
|
||||||
List<BaseNode> paramsList = new();
|
List<BaseNode> paramsList = [];
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -1588,7 +1588,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> expressions = new();
|
List<BaseNode> expressions = [];
|
||||||
if (ConsumeIf("_"))
|
if (ConsumeIf("_"))
|
||||||
{
|
{
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
@ -1730,8 +1730,8 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> expressions = new();
|
List<BaseNode> expressions = [];
|
||||||
List<BaseNode> initializers = new();
|
List<BaseNode> initializers = [];
|
||||||
|
|
||||||
while (!ConsumeIf("_"))
|
while (!ConsumeIf("_"))
|
||||||
{
|
{
|
||||||
@ -1899,7 +1899,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> names = new();
|
List<BaseNode> names = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
expression = ParseExpression();
|
expression = ParseExpression();
|
||||||
@ -2048,7 +2048,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
case 'l':
|
case 'l':
|
||||||
_position += 2;
|
_position += 2;
|
||||||
|
|
||||||
List<BaseNode> bracedExpressions = new();
|
List<BaseNode> bracedExpressions = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
expression = ParseBracedExpression();
|
expression = ParseBracedExpression();
|
||||||
@ -2327,7 +2327,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return null;
|
return null;
|
||||||
case 'P':
|
case 'P':
|
||||||
_position += 2;
|
_position += 2;
|
||||||
List<BaseNode> arguments = new();
|
List<BaseNode> arguments = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
BaseNode argument = ParseTemplateArgument();
|
BaseNode argument = ParseTemplateArgument();
|
||||||
@ -2368,7 +2368,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> bracedExpressions = new();
|
List<BaseNode> bracedExpressions = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
expression = ParseBracedExpression();
|
expression = ParseBracedExpression();
|
||||||
@ -2600,7 +2600,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
_templateParamList.Clear();
|
_templateParamList.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> args = new();
|
List<BaseNode> args = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
if (hasContext)
|
if (hasContext)
|
||||||
@ -2659,7 +2659,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
// J <template-arg>* E
|
// J <template-arg>* E
|
||||||
case 'J':
|
case 'J':
|
||||||
_position++;
|
_position++;
|
||||||
List<BaseNode> templateArguments = new();
|
List<BaseNode> templateArguments = [];
|
||||||
while (!ConsumeIf("E"))
|
while (!ConsumeIf("E"))
|
||||||
{
|
{
|
||||||
BaseNode templateArgument = ParseTemplateArgument();
|
BaseNode templateArgument = ParseTemplateArgument();
|
||||||
@ -3298,7 +3298,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
|||||||
return new EncodedFunction(name, null, context.Cv, context.Ref, null, returnType);
|
return new EncodedFunction(name, null, context.Cv, context.Ref, null, returnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BaseNode> paramsList = new();
|
List<BaseNode> paramsList = [];
|
||||||
|
|
||||||
// backup because that can be destroyed by parseType
|
// backup because that can be destroyed by parseType
|
||||||
CvType cv = context.Cv;
|
CvType cv = context.Cv;
|
||||||
|
@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
PerformanceState = new PerformanceState();
|
PerformanceState = new PerformanceState();
|
||||||
|
|
||||||
NfpDevices = new List<NfpDevice>();
|
NfpDevices = [];
|
||||||
|
|
||||||
// Note: This is not really correct, but with HLE of services, the only memory
|
// Note: This is not really correct, but with HLE of services, the only memory
|
||||||
// region used that is used is Application, so we can use the other ones for anything.
|
// region used that is used is Application, so we can use the other ones for anything.
|
||||||
@ -283,14 +283,15 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
ProcessCreationInfo creationInfo = new("Service", 1, 0, 0x8000000, 1, Flags, 0, 0);
|
ProcessCreationInfo creationInfo = new("Service", 1, 0, 0x8000000, 1, Flags, 0, 0);
|
||||||
|
|
||||||
uint[] defaultCapabilities = {
|
uint[] defaultCapabilities =
|
||||||
|
[
|
||||||
(((uint)KScheduler.CpuCoresCount - 1) << 24) + (((uint)KScheduler.CpuCoresCount - 1) << 16) + 0x63F7u,
|
(((uint)KScheduler.CpuCoresCount - 1) << 24) + (((uint)KScheduler.CpuCoresCount - 1) << 16) + 0x63F7u,
|
||||||
0x1FFFFFCF,
|
0x1FFFFFCF,
|
||||||
0x207FFFEF,
|
0x207FFFEF,
|
||||||
0x47E0060F,
|
0x47E0060F,
|
||||||
0x0048BFFF,
|
0x0048BFFF,
|
||||||
0x01007FFF,
|
0x01007FFF
|
||||||
};
|
];
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - Pass enough information (capabilities, process creation info, etc) on ServiceEntry for proper initialization.
|
// - Pass enough information (capabilities, process creation info, etc) on ServiceEntry for proper initialization.
|
||||||
@ -341,7 +342,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
{
|
{
|
||||||
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
||||||
{
|
{
|
||||||
VirtualAmiibo.ApplicationBytes = Array.Empty<byte>();
|
VirtualAmiibo.ApplicationBytes = [];
|
||||||
VirtualAmiibo.InputBin = string.Empty;
|
VirtualAmiibo.InputBin = string.Empty;
|
||||||
}
|
}
|
||||||
if (NfpDevices[nfpDeviceId].State == NfpDeviceState.SearchingForTag)
|
if (NfpDevices[nfpDeviceId].State == NfpDeviceState.SearchingForTag)
|
||||||
@ -356,7 +357,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
VirtualAmiibo.InputBin = path;
|
VirtualAmiibo.InputBin = path;
|
||||||
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
||||||
{
|
{
|
||||||
VirtualAmiibo.ApplicationBytes = Array.Empty<byte>();
|
VirtualAmiibo.ApplicationBytes = [];
|
||||||
}
|
}
|
||||||
byte[] encryptedData = File.ReadAllBytes(path);
|
byte[] encryptedData = File.ReadAllBytes(path);
|
||||||
VirtualAmiiboFile newFile = AmiiboBinReader.ReadBinFile(encryptedData);
|
VirtualAmiiboFile newFile = AmiiboBinReader.ReadBinFile(encryptedData);
|
||||||
|
@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||||||
PId = HasPId ? reader.ReadUInt64() : 0;
|
PId = HasPId ? reader.ReadUInt64() : 0;
|
||||||
|
|
||||||
int toCopySize = (word >> 1) & 0xf;
|
int toCopySize = (word >> 1) & 0xf;
|
||||||
int[] toCopy = toCopySize == 0 ? Array.Empty<int>() : new int[toCopySize];
|
int[] toCopy = toCopySize == 0 ? [] : new int[toCopySize];
|
||||||
|
|
||||||
for (int index = 0; index < toCopy.Length; index++)
|
for (int index = 0; index < toCopy.Length; index++)
|
||||||
{
|
{
|
||||||
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||||||
ToCopy = toCopy;
|
ToCopy = toCopy;
|
||||||
|
|
||||||
int toMoveSize = (word >> 5) & 0xf;
|
int toMoveSize = (word >> 5) & 0xf;
|
||||||
int[] toMove = toMoveSize == 0 ? Array.Empty<int>() : new int[toMoveSize];
|
int[] toMove = toMoveSize == 0 ? [] : new int[toMoveSize];
|
||||||
|
|
||||||
for (int index = 0; index < toMove.Length; index++)
|
for (int index = 0; index < toMove.Length; index++)
|
||||||
{
|
{
|
||||||
@ -59,12 +59,12 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||||||
|
|
||||||
public static IpcHandleDesc MakeCopy(params int[] handles)
|
public static IpcHandleDesc MakeCopy(params int[] handles)
|
||||||
{
|
{
|
||||||
return new IpcHandleDesc(handles, Array.Empty<int>());
|
return new IpcHandleDesc(handles, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IpcHandleDesc MakeMove(params int[] handles)
|
public static IpcHandleDesc MakeMove(params int[] handles)
|
||||||
{
|
{
|
||||||
return new IpcHandleDesc(Array.Empty<int>(), handles);
|
return new IpcHandleDesc([], handles);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RecyclableMemoryStream GetStream()
|
public RecyclableMemoryStream GetStream()
|
||||||
|
@ -26,13 +26,13 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||||||
|
|
||||||
public IpcMessage()
|
public IpcMessage()
|
||||||
{
|
{
|
||||||
PtrBuff = new List<IpcPtrBuffDesc>(0);
|
PtrBuff = [];
|
||||||
SendBuff = new List<IpcBuffDesc>(0);
|
SendBuff = [];
|
||||||
ReceiveBuff = new List<IpcBuffDesc>(0);
|
ReceiveBuff = [];
|
||||||
ExchangeBuff = new List<IpcBuffDesc>(0);
|
ExchangeBuff = [];
|
||||||
RecvListBuff = new List<IpcRecvListBuffDesc>(0);
|
RecvListBuff = [];
|
||||||
|
|
||||||
ObjectIds = new List<int>(0);
|
ObjectIds = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public IpcMessage(ReadOnlySpan<byte> data, long cmdPtr)
|
public IpcMessage(ReadOnlySpan<byte> data, long cmdPtr)
|
||||||
@ -122,7 +122,7 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||||||
RecvListBuff.Add(new IpcRecvListBuffDesc(reader.ReadUInt64()));
|
RecvListBuff.Add(new IpcRecvListBuffDesc(reader.ReadUInt64()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectIds = new List<int>(0);
|
ObjectIds = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public RecyclableMemoryStream GetStream(long cmdPtr, ulong recvListAddr)
|
public RecyclableMemoryStream GetStream(long cmdPtr, ulong recvListAddr)
|
||||||
|
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||||||
_current2 = new long[(int)LimitableResource.Count];
|
_current2 = new long[(int)LimitableResource.Count];
|
||||||
_peak = new long[(int)LimitableResource.Count];
|
_peak = new long[(int)LimitableResource.Count];
|
||||||
|
|
||||||
_waitingThreads = new LinkedList<KThread>();
|
_waitingThreads = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Reserve(LimitableResource resource, ulong amount)
|
public bool Reserve(LimitableResource resource, ulong amount)
|
||||||
|
@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||||||
|
|
||||||
public KSynchronizationObject(KernelContext context) : base(context)
|
public KSynchronizationObject(KernelContext context) : base(context)
|
||||||
{
|
{
|
||||||
WaitingThreads = new LinkedList<KThread>();
|
WaitingThreads = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinkedListNode<KThread> AddWaitingThread(KThread thread)
|
public LinkedListNode<KThread> AddWaitingThread(KThread thread)
|
||||||
|
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||||||
public KTimeManager(KernelContext context)
|
public KTimeManager(KernelContext context)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
_waitingObjects = new List<WaitingObject>();
|
_waitingObjects = [];
|
||||||
_keepRunning = true;
|
_keepRunning = true;
|
||||||
|
|
||||||
Thread work = new(WaitAndCheckScheduledObjects)
|
Thread work = new(WaitAndCheckScheduledObjects)
|
||||||
|
@ -72,13 +72,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||||||
|
|
||||||
servicePool = new MemoryRegion(DramMemoryMap.SlabHeapEnd, servicePoolSize);
|
servicePool = new MemoryRegion(DramMemoryMap.SlabHeapEnd, servicePoolSize);
|
||||||
|
|
||||||
return new[]
|
return
|
||||||
{
|
[
|
||||||
GetMemoryRegion(applicationPool),
|
GetMemoryRegion(applicationPool),
|
||||||
GetMemoryRegion(appletPool),
|
GetMemoryRegion(appletPool),
|
||||||
GetMemoryRegion(servicePool),
|
GetMemoryRegion(servicePool),
|
||||||
GetMemoryRegion(nvServicesPool),
|
GetMemoryRegion(nvServicesPool)
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static KMemoryRegionManager GetMemoryRegion(MemoryRegion region)
|
private static KMemoryRegionManager GetMemoryRegion(MemoryRegion region)
|
||||||
|
@ -16,8 +16,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
|
|
||||||
_incomingConnections = new LinkedList<KServerSession>();
|
_incomingConnections = [];
|
||||||
_lightIncomingConnections = new LinkedList<KLightServerSession>();
|
_lightIncomingConnections = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnqueueIncomingSession(KServerSession session)
|
public void EnqueueIncomingSession(KServerSession session)
|
||||||
|
@ -10,12 +10,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||||||
{
|
{
|
||||||
class KServerSession : KSynchronizationObject
|
class KServerSession : KSynchronizationObject
|
||||||
{
|
{
|
||||||
private static readonly MemoryState[] _ipcMemoryStates = {
|
private static readonly MemoryState[] _ipcMemoryStates =
|
||||||
|
[
|
||||||
MemoryState.IpcBuffer3,
|
MemoryState.IpcBuffer3,
|
||||||
MemoryState.IpcBuffer0,
|
MemoryState.IpcBuffer0,
|
||||||
MemoryState.IpcBuffer1,
|
MemoryState.IpcBuffer1,
|
||||||
(MemoryState)0xfffce5d4, //This is invalid, shouldn't be accessed.
|
(MemoryState)0xfffce5d4 //This is invalid, shouldn't be accessed.
|
||||||
};
|
];
|
||||||
|
|
||||||
private readonly struct Message
|
private readonly struct Message
|
||||||
{
|
{
|
||||||
@ -176,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
|
|
||||||
_requests = new LinkedList<KSessionRequest>();
|
_requests = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result EnqueueRequest(KSessionRequest request)
|
public Result EnqueueRequest(KSessionRequest request)
|
||||||
|
@ -84,7 +84,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly int[] _memoryBlockPageShifts = { 12, 16, 21, 22, 25, 29, 30 };
|
private static readonly int[] _memoryBlockPageShifts = [12, 16, 21, 22, 25, 29, 30];
|
||||||
|
|
||||||
#pragma warning disable IDE0052 // Remove unread private member
|
#pragma warning disable IDE0052 // Remove unread private member
|
||||||
private readonly ulong _heapAddress;
|
private readonly ulong _heapAddress;
|
||||||
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
|
|
||||||
public KPageList()
|
public KPageList()
|
||||||
{
|
{
|
||||||
Nodes = new LinkedList<KPageNode>();
|
Nodes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result AddRange(ulong address, ulong pagesCount)
|
public Result AddRange(ulong address, ulong pagesCount)
|
||||||
|
@ -13,14 +13,15 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
{
|
{
|
||||||
abstract class KPageTableBase
|
abstract class KPageTableBase
|
||||||
{
|
{
|
||||||
private static readonly int[] _mappingUnitSizes = {
|
private static readonly int[] _mappingUnitSizes =
|
||||||
|
[
|
||||||
0x1000,
|
0x1000,
|
||||||
0x10000,
|
0x10000,
|
||||||
0x200000,
|
0x200000,
|
||||||
0x400000,
|
0x400000,
|
||||||
0x2000000,
|
0x2000000,
|
||||||
0x40000000,
|
0x40000000
|
||||||
};
|
];
|
||||||
|
|
||||||
private const ulong RegionAlignment = 0x200000;
|
private const ulong RegionAlignment = 0x200000;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
|
|
||||||
public KSlabHeap(ulong pa, ulong itemSize, ulong size)
|
public KSlabHeap(ulong pa, ulong itemSize, ulong size)
|
||||||
{
|
{
|
||||||
_items = new LinkedList<ulong>();
|
_items = [];
|
||||||
|
|
||||||
int itemsCount = (int)(size / itemSize);
|
int itemsCount = (int)(size / itemSize);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||||||
{
|
{
|
||||||
_owner = owner;
|
_owner = owner;
|
||||||
|
|
||||||
_images = new List<Image>();
|
_images = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetGuestStackTrace(KThread thread)
|
public string GetGuestStackTrace(KThread thread)
|
||||||
@ -414,7 +414,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||||||
ulong strTblAddr = textOffset + strTab;
|
ulong strTblAddr = textOffset + strTab;
|
||||||
ulong symTblAddr = textOffset + symTab;
|
ulong symTblAddr = textOffset + symTab;
|
||||||
|
|
||||||
List<ElfSymbol> symbols = new();
|
List<ElfSymbol> symbols = [];
|
||||||
|
|
||||||
while (symTblAddr < strTblAddr)
|
while (symTblAddr < strTblAddr)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||||||
// TODO: Remove once we no longer need to initialize it externally.
|
// TODO: Remove once we no longer need to initialize it externally.
|
||||||
HandleTable = new KHandleTable();
|
HandleTable = new KHandleTable();
|
||||||
|
|
||||||
_threads = new LinkedList<KThread>();
|
_threads = [];
|
||||||
|
|
||||||
Debugger = new HleProcessDebugger(this);
|
Debugger = new HleProcessDebugger(this);
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
|
|
||||||
_condVarThreads = new List<KThread>();
|
_condVarThreads = [];
|
||||||
_arbiterThreads = new List<KThread>();
|
_arbiterThreads = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result ArbitrateLock(int ownerHandle, ulong mutexAddress, int requesterHandle)
|
public Result ArbitrateLock(int ownerHandle, ulong mutexAddress, int requesterHandle)
|
||||||
|
@ -23,8 +23,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||||||
|
|
||||||
for (int core = 0; core < KScheduler.CpuCoresCount; core++)
|
for (int core = 0; core < KScheduler.CpuCoresCount; core++)
|
||||||
{
|
{
|
||||||
_suggestedThreadsPerPrioPerCore[prio][core] = new LinkedList<KThread>();
|
_suggestedThreadsPerPrioPerCore[prio][core] = [];
|
||||||
_scheduledThreadsPerPrioPerCore[prio][core] = new LinkedList<KThread>();
|
_scheduledThreadsPerPrioPerCore[prio][core] = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,8 +121,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||||||
|
|
||||||
SiblingsPerCore = new LinkedListNode<KThread>[KScheduler.CpuCoresCount];
|
SiblingsPerCore = new LinkedListNode<KThread>[KScheduler.CpuCoresCount];
|
||||||
|
|
||||||
_mutexWaiters = new LinkedList<KThread>();
|
_mutexWaiters = [];
|
||||||
_pinnedWaiters = new LinkedList<KThread>();
|
_pinnedWaiters = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result Initialize(
|
public Result Initialize(
|
||||||
|
@ -100,20 +100,20 @@ namespace Ryujinx.HLE.HOS
|
|||||||
AccessControlBits.Bits.MoveCacheStorage;
|
AccessControlBits.Bits.MoveCacheStorage;
|
||||||
|
|
||||||
// Sdb has save data access control info so we can't store just its access control bits
|
// Sdb has save data access control info so we can't store just its access control bits
|
||||||
private static ReadOnlySpan<byte> SdbFacData => new byte[]
|
private static ReadOnlySpan<byte> SdbFacData =>
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x03, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x10, 0x00, 0x00,
|
0x03, 0x03, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x10, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x01,
|
0x00, 0x00, 0x00, 0x01
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> SdbFacDescriptor => new byte[]
|
private static ReadOnlySpan<byte> SdbFacDescriptor =>
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
0x01, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,11 +87,11 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
public ModCache()
|
public ModCache()
|
||||||
{
|
{
|
||||||
RomfsContainers = new List<Mod<FileInfo>>();
|
RomfsContainers = [];
|
||||||
ExefsContainers = new List<Mod<FileInfo>>();
|
ExefsContainers = [];
|
||||||
RomfsDirs = new List<Mod<DirectoryInfo>>();
|
RomfsDirs = [];
|
||||||
ExefsDirs = new List<Mod<DirectoryInfo>>();
|
ExefsDirs = [];
|
||||||
Cheats = new List<Cheat>();
|
Cheats = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,9 +106,9 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
public PatchCache()
|
public PatchCache()
|
||||||
{
|
{
|
||||||
NsoPatches = new List<Mod<DirectoryInfo>>();
|
NsoPatches = [];
|
||||||
NroPatches = new List<Mod<DirectoryInfo>>();
|
NroPatches = [];
|
||||||
KipPatches = new List<Mod<DirectoryInfo>>();
|
KipPatches = [];
|
||||||
|
|
||||||
Initialized = false;
|
Initialized = false;
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
private static IEnumerable<Cheat> GetCheatsInFile(FileInfo cheatFile)
|
private static IEnumerable<Cheat> GetCheatsInFile(FileInfo cheatFile)
|
||||||
{
|
{
|
||||||
string cheatName = DefaultCheatName;
|
string cheatName = DefaultCheatName;
|
||||||
List<string> instructions = new();
|
List<string> instructions = [];
|
||||||
|
|
||||||
using StreamReader cheatData = cheatFile.OpenText();
|
using StreamReader cheatData = cheatFile.OpenText();
|
||||||
while (cheatData.ReadLine() is { } line)
|
while (cheatData.ReadLine() is { } line)
|
||||||
@ -384,7 +384,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
// Start a new cheat section.
|
// Start a new cheat section.
|
||||||
cheatName = line[1..^1];
|
cheatName = line[1..^1];
|
||||||
instructions = new List<string>();
|
instructions = [];
|
||||||
}
|
}
|
||||||
else if (line.Length > 0)
|
else if (line.Length > 0)
|
||||||
{
|
{
|
||||||
@ -470,7 +470,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
return baseStorage;
|
return baseStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet<string> fileSet = new();
|
HashSet<string> fileSet = [];
|
||||||
RomFsBuilder builder = new();
|
RomFsBuilder builder = new();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||||||
_horizonClient = horizonClient;
|
_horizonClient = horizonClient;
|
||||||
|
|
||||||
_profiles = new ConcurrentDictionary<string, UserProfile>();
|
_profiles = new ConcurrentDictionary<string, UserProfile>();
|
||||||
_storedOpenedUsers = Array.Empty<UserProfile>();
|
_storedOpenedUsers = [];
|
||||||
|
|
||||||
_accountSaveDataManager = new AccountSaveDataManager(_profiles);
|
_accountSaveDataManager = new AccountSaveDataManager(_profiles);
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||||||
{
|
{
|
||||||
ProfilesJson profilesJson = new()
|
ProfilesJson profilesJson = new()
|
||||||
{
|
{
|
||||||
Profiles = new List<UserProfileJson>(),
|
Profiles = [],
|
||||||
LastOpened = LastOpened.ToString(),
|
LastOpened = LastOpened.ToString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -872,8 +872,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
|
|
||||||
// Initialize entries to avoid issues with some games.
|
// Initialize entries to avoid issues with some games.
|
||||||
|
|
||||||
List<GamepadInput> emptyGamepadInputs = new();
|
List<GamepadInput> emptyGamepadInputs = [];
|
||||||
List<SixAxisInput> emptySixAxisInputs = new();
|
List<SixAxisInput> emptySixAxisInputs = [];
|
||||||
|
|
||||||
for (int player = 0; player < NpadDevices.MaxControllers; player++)
|
for (int player = 0; player < NpadDevices.MaxControllers; player++)
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ namespace Ryujinx.HLE.HOS.Services
|
|||||||
{
|
{
|
||||||
Logger.Trace?.Print(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Name}");
|
Logger.Trace?.Print(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Name}");
|
||||||
|
|
||||||
result = (ResultCode)processRequest.Invoke(service, new object[] { context });
|
result = (ResultCode)processRequest.Invoke(service, [context]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ namespace Ryujinx.HLE.HOS.Services
|
|||||||
{
|
{
|
||||||
Logger.Debug?.Print(LogClass.KernelIpc, $"{GetType().Name}: {processRequest.Name}");
|
Logger.Debug?.Print(LogClass.KernelIpc, $"{GetType().Name}: {processRequest.Name}");
|
||||||
|
|
||||||
result = (ResultCode)processRequest.Invoke(this, new object[] { context });
|
result = (ResultCode)processRequest.Invoke(this, [context]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||||||
NetworkConfig = networkConfig,
|
NetworkConfig = networkConfig,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool success = _parent.NetworkClient.CreateNetwork(request, _advertiseData ?? Array.Empty<byte>());
|
bool success = _parent.NetworkClient.CreateNetwork(request, _advertiseData ?? []);
|
||||||
|
|
||||||
return success ? ResultCode.Success : ResultCode.InvalidState;
|
return success ? ResultCode.Success : ResultCode.InvalidState;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Array.Empty<NodeLatestUpdate>();
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||||||
public NetworkInfo[] Scan(ushort channel, ScanFilter scanFilter)
|
public NetworkInfo[] Scan(ushort channel, ScanFilter scanFilter)
|
||||||
{
|
{
|
||||||
Logger.Warning?.PrintMsg(LogClass.ServiceLdn, "Attempted to scan for networks, but Multiplayer is disabled!");
|
Logger.Warning?.PrintMsg(LogClass.ServiceLdn, "Attempted to scan for networks, but Multiplayer is disabled!");
|
||||||
return Array.Empty<NetworkInfo>();
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAdvertiseData(byte[] data) { }
|
public void SetAdvertiseData(byte[] data) { }
|
||||||
|
@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||||||
private readonly Ssid _fakeSsid;
|
private readonly Ssid _fakeSsid;
|
||||||
private ILdnTcpSocket _tcp;
|
private ILdnTcpSocket _tcp;
|
||||||
private LdnProxyUdpServer _udp, _udp2;
|
private LdnProxyUdpServer _udp, _udp2;
|
||||||
private readonly List<LdnProxyTcpSession> _stations = new();
|
private readonly List<LdnProxyTcpSession> _stations = [];
|
||||||
private readonly Lock _lock = new();
|
private readonly Lock _lock = new();
|
||||||
|
|
||||||
private readonly AutoResetEvent _apConnected = new(false);
|
private readonly AutoResetEvent _apConnected = new(false);
|
||||||
@ -340,10 +340,10 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||||||
|
|
||||||
if (_protocol.SendBroadcast(_udp, LanPacketType.Scan, DefaultPort) < 0)
|
if (_protocol.SendBroadcast(_udp, LanPacketType.Scan, DefaultPort) < 0)
|
||||||
{
|
{
|
||||||
return Array.Empty<NetworkInfo>();
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
List<NetworkInfo> outNetworkInfo = new();
|
List<NetworkInfo> outNetworkInfo = [];
|
||||||
|
|
||||||
foreach (KeyValuePair<ulong, NetworkInfo> item in _udp.GetScanResults())
|
foreach (KeyValuePair<ulong, NetworkInfo> item in _udp.GetScanResults())
|
||||||
{
|
{
|
||||||
|
@ -162,7 +162,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||||||
|
|
||||||
public int SendBroadcast(ILdnSocket s, LanPacketType type, int port)
|
public int SendBroadcast(ILdnSocket s, LanPacketType type, int port)
|
||||||
{
|
{
|
||||||
return SendPacket(s, type, Array.Empty<byte>(), new IPEndPoint(_discovery.LocalBroadcastAddr, port));
|
return SendPacket(s, type, [], new IPEndPoint(_discovery.LocalBroadcastAddr, port));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int SendPacket(ILdnSocket s, LanPacketType type, byte[] data, EndPoint endPoint = null)
|
public int SendPacket(ILdnSocket s, LanPacketType type, byte[] data, EndPoint endPoint = null)
|
||||||
@ -231,7 +231,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||||||
|
|
||||||
private int Compress(byte[] input, out byte[] output)
|
private int Compress(byte[] input, out byte[] output)
|
||||||
{
|
{
|
||||||
List<byte> outputList = new();
|
List<byte> outputList = [];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int maxCount = 0xFF;
|
int maxCount = 0xFF;
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||||||
|
|
||||||
private int Decompress(byte[] input, out byte[] output)
|
private int Decompress(byte[] input, out byte[] output)
|
||||||
{
|
{
|
||||||
List<byte> outputList = new();
|
List<byte> outputList = [];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (i < input.Length && outputList.Count < BufferSize)
|
while (i < input.Length && outputList.Count < BufferSize)
|
||||||
|
@ -40,7 +40,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
|
|||||||
private readonly RyuLdnProtocol _protocol;
|
private readonly RyuLdnProtocol _protocol;
|
||||||
private readonly NetworkTimeout _timeout;
|
private readonly NetworkTimeout _timeout;
|
||||||
|
|
||||||
private readonly List<NetworkInfo> _availableGames = new();
|
private readonly List<NetworkInfo> _availableGames = [];
|
||||||
private DisconnectReason _disconnectReason;
|
private DisconnectReason _disconnectReason;
|
||||||
|
|
||||||
private P2pProxyServer _hostedProxy;
|
private P2pProxyServer _hostedProxy;
|
||||||
@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
|
|||||||
|
|
||||||
ConnectAsync();
|
ConnectAsync();
|
||||||
|
|
||||||
int index = WaitHandle.WaitAny(new WaitHandle[] { _connected, _error }, FailureTimeout);
|
int index = WaitHandle.WaitAny([_connected, _error], FailureTimeout);
|
||||||
|
|
||||||
if (IsConnected)
|
if (IsConnected)
|
||||||
{
|
{
|
||||||
@ -326,7 +326,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
|
|||||||
|
|
||||||
SendAsync(_protocol.Encode(PacketId.Reject, new RejectRequest(disconnectReason, nodeId)));
|
SendAsync(_protocol.Encode(PacketId.Reject, new RejectRequest(disconnectReason, nodeId)));
|
||||||
|
|
||||||
int index = WaitHandle.WaitAny(new WaitHandle[] { _reject, _error }, InactiveTimeout);
|
int index = WaitHandle.WaitAny([_reject, _error], InactiveTimeout);
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
@ -566,13 +566,13 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
|
|||||||
|
|
||||||
SendAsync(_protocol.Encode(PacketId.Scan, scanFilter));
|
SendAsync(_protocol.Encode(PacketId.Scan, scanFilter));
|
||||||
|
|
||||||
index = WaitHandle.WaitAny(new WaitHandle[] { _scan, _error }, ScanTimeout);
|
index = WaitHandle.WaitAny([_scan, _error], ScanTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index != 0)
|
if (index != 0)
|
||||||
{
|
{
|
||||||
// An error occurred or timeout. Write 0 games.
|
// An error occurred or timeout. Write 0 games.
|
||||||
return Array.Empty<NetworkInfo>();
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return _availableGames.ToArray();
|
return _availableGames.ToArray();
|
||||||
|
@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||||||
{
|
{
|
||||||
private const ushort EphemeralBase = 49152;
|
private const ushort EphemeralBase = 49152;
|
||||||
|
|
||||||
private readonly List<ushort> _ephemeralPorts = new();
|
private readonly List<ushort> _ephemeralPorts = [];
|
||||||
|
|
||||||
private readonly Lock _lock = new();
|
private readonly Lock _lock = new();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||||||
public EndPoint LocalEndpoint { get; }
|
public EndPoint LocalEndpoint { get; }
|
||||||
public IPAddress LocalAddress { get; }
|
public IPAddress LocalAddress { get; }
|
||||||
|
|
||||||
private readonly List<LdnProxySocket> _sockets = new();
|
private readonly List<LdnProxySocket> _sockets = [];
|
||||||
private readonly Dictionary<ProtocolType, EphemeralPortPool> _ephemeralPorts = new();
|
private readonly Dictionary<ProtocolType, EphemeralPortPool> _ephemeralPorts = new();
|
||||||
|
|
||||||
private readonly IProxyClient _parent;
|
private readonly IProxyClient _parent;
|
||||||
|
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||||||
private readonly LdnProxy _proxy;
|
private readonly LdnProxy _proxy;
|
||||||
|
|
||||||
private bool _isListening;
|
private bool _isListening;
|
||||||
private readonly List<LdnProxySocket> _listenSockets = new();
|
private readonly List<LdnProxySocket> _listenSockets = [];
|
||||||
|
|
||||||
private readonly Queue<ProxyConnectRequest> _connectRequests = new();
|
private readonly Queue<ProxyConnectRequest> _connectRequests = new();
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||||||
private NatDevice _natDevice;
|
private NatDevice _natDevice;
|
||||||
private Mapping _portMapping;
|
private Mapping _portMapping;
|
||||||
|
|
||||||
private readonly List<P2pProxySession> _players = new();
|
private readonly List<P2pProxySession> _players = [];
|
||||||
|
|
||||||
private readonly List<ExternalProxyToken> _waitingTokens = new();
|
private readonly List<ExternalProxyToken> _waitingTokens = [];
|
||||||
private readonly AutoResetEvent _tokenEvent = new(false);
|
private readonly AutoResetEvent _tokenEvent = new(false);
|
||||||
|
|
||||||
private uint _broadcastAddress;
|
private uint _broadcastAddress;
|
||||||
|
@ -40,11 +40,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0055 // Disable formatting
|
#pragma warning disable IDE0055 // Disable formatting
|
||||||
public static ReadOnlySpan<byte> Ver3FacelineColorTable => new byte[] { 0, 1, 2, 3, 4, 5 };
|
public static ReadOnlySpan<byte> Ver3FacelineColorTable => [0, 1, 2, 3, 4, 5];
|
||||||
public static ReadOnlySpan<byte> Ver3HairColorTable => new byte[] { 8, 1, 2, 3, 4, 5, 6, 7 };
|
public static ReadOnlySpan<byte> Ver3HairColorTable => [8, 1, 2, 3, 4, 5, 6, 7];
|
||||||
public static ReadOnlySpan<byte> Ver3EyeColorTable => new byte[] { 8, 9, 10, 11, 12, 13 };
|
public static ReadOnlySpan<byte> Ver3EyeColorTable => [8, 9, 10, 11, 12, 13];
|
||||||
public static ReadOnlySpan<byte> Ver3MouthColorTable => new byte[] { 19, 20, 21, 22, 23 };
|
public static ReadOnlySpan<byte> Ver3MouthColorTable => [19, 20, 21, 22, 23];
|
||||||
public static ReadOnlySpan<byte> Ver3GlassColorTable => new byte[] { 8, 14, 15, 16, 17, 18, 0 };
|
public static ReadOnlySpan<byte> Ver3GlassColorTable => [8, 14, 15, 16, 17, 18, 0];
|
||||||
#pragma warning restore IDE0055
|
#pragma warning restore IDE0055
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -830,8 +830,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region "Element Info Array"
|
#region "Element Info Array"
|
||||||
private readonly ReadOnlySpan<byte> ElementInfoArray => new byte[]
|
private readonly ReadOnlySpan<byte> ElementInfoArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x83, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x83, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -905,8 +905,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x1b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x1b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
// The first 2 Mii in the default table are used as base for Male/Female in editor but not exposed via IPC.
|
// The first 2 Mii in the default table are used as base for Male/Female in editor but not exposed via IPC.
|
||||||
public static int TableLength => _fromIndex.Length;
|
public static int TableLength => _fromIndex.Length;
|
||||||
|
|
||||||
private static readonly int[] _fromIndex = { 2, 3, 4, 5, 6, 7 };
|
private static readonly int[] _fromIndex = [2, 3, 4, 5, 6, 7];
|
||||||
|
|
||||||
public static DefaultMii GetDefaultMii(uint index)
|
public static DefaultMii GetDefaultMii(uint index)
|
||||||
{
|
{
|
||||||
@ -81,8 +81,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region "Raw Table Array"
|
#region "Raw Table Array"
|
||||||
private static ReadOnlySpan<byte> TableRawArray => new byte[]
|
private static ReadOnlySpan<byte> TableRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
@ -190,8 +190,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x6f, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x6f, 0x00,
|
||||||
0x20, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x20, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,17 +6,19 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
{
|
{
|
||||||
static class RandomMiiConstants
|
static class RandomMiiConstants
|
||||||
{
|
{
|
||||||
public static readonly int[] EyeRotateTable = {
|
public static readonly int[] EyeRotateTable =
|
||||||
|
[
|
||||||
0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04,
|
0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04,
|
||||||
0x04, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04,
|
0x04, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04,
|
||||||
0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03,
|
0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04,
|
0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04
|
||||||
};
|
];
|
||||||
|
|
||||||
public static readonly int[] EyebrowRotateTable = {
|
public static readonly int[] EyebrowRotateTable =
|
||||||
|
[
|
||||||
0x06, 0x06, 0x05, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06,
|
0x06, 0x06, 0x05, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06,
|
||||||
0x07, 0x07, 0x06, 0x06, 0x05, 0x06, 0x07, 0x05,
|
0x07, 0x07, 0x06, 0x06, 0x05, 0x06, 0x07, 0x05
|
||||||
};
|
];
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum BeardAndMustacheFlag
|
public enum BeardAndMustacheFlag
|
||||||
@ -89,8 +91,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
|
|
||||||
#region "Random Mii Data Arrays"
|
#region "Random Mii Data Arrays"
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiFacelineRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiFacelineRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||||
@ -320,11 +322,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiFacelineColorRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiFacelineColorRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||||
@ -399,11 +401,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiFacelineWrinkleRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiFacelineWrinkleRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -633,11 +635,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiFacelineMakeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiFacelineMakeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -867,11 +869,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiHairTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiHairTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||||
0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||||
0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||||
@ -1101,11 +1103,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiHairColorRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiHairColorRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -1218,11 +1220,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiEyeTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiEyeTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||||
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||||
@ -1452,11 +1454,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiEyeColorRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiEyeColorRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
@ -1493,11 +1495,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiEyebrowTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiEyebrowTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
@ -1727,11 +1729,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiNoseTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiNoseTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
@ -1961,11 +1963,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiMouthTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiMouthTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||||
0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
@ -2195,11 +2197,11 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> RandomMiiGlassTypeRawArray => new byte[]
|
private static ReadOnlySpan<byte> RandomMiiGlassTypeRawArray =>
|
||||||
{
|
[
|
||||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
|
||||||
0x60, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x60, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -2236,8 +2238,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||||||
static class VirtualAmiibo
|
static class VirtualAmiibo
|
||||||
{
|
{
|
||||||
public static uint OpenedApplicationAreaId;
|
public static uint OpenedApplicationAreaId;
|
||||||
public static byte[] ApplicationBytes = Array.Empty<byte>();
|
public static byte[] ApplicationBytes = [];
|
||||||
public static string InputBin = string.Empty;
|
public static string InputBin = string.Empty;
|
||||||
public static string NickName = string.Empty;
|
public static string NickName = string.Empty;
|
||||||
private static readonly AmiiboJsonSerializerContext _serializerContext = AmiiboJsonSerializerContext.Default;
|
private static readonly AmiiboJsonSerializerContext _serializerContext = AmiiboJsonSerializerContext.Default;
|
||||||
@ -137,7 +137,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||||||
if (ApplicationBytes.Length > 0)
|
if (ApplicationBytes.Length > 0)
|
||||||
{
|
{
|
||||||
byte[] bytes = ApplicationBytes;
|
byte[] bytes = ApplicationBytes;
|
||||||
ApplicationBytes = Array.Empty<byte>();
|
ApplicationBytes = [];
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
VirtualAmiiboFile virtualAmiiboFile = LoadAmiiboFile(amiiboId);
|
VirtualAmiiboFile virtualAmiiboFile = LoadAmiiboFile(amiiboId);
|
||||||
@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.Empty<byte>();
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool CreateApplicationArea(string amiiboId, uint applicationAreaId, byte[] applicationAreaData)
|
public static bool CreateApplicationArea(string amiiboId, uint applicationAreaId, byte[] applicationAreaData)
|
||||||
@ -219,12 +219,12 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||||||
virtualAmiiboFile = new VirtualAmiiboFile()
|
virtualAmiiboFile = new VirtualAmiiboFile()
|
||||||
{
|
{
|
||||||
FileVersion = 0,
|
FileVersion = 0,
|
||||||
TagUuid = Array.Empty<byte>(),
|
TagUuid = [],
|
||||||
AmiiboId = amiiboId,
|
AmiiboId = amiiboId,
|
||||||
FirstWriteDate = DateTime.Now,
|
FirstWriteDate = DateTime.Now,
|
||||||
LastWriteDate = DateTime.Now,
|
LastWriteDate = DateTime.Now,
|
||||||
WriteCounter = 0,
|
WriteCounter = 0,
|
||||||
ApplicationAreas = new List<VirtualAmiiboApplicationArea>(),
|
ApplicationAreas = [],
|
||||||
};
|
};
|
||||||
|
|
||||||
SaveAmiiboFile(virtualAmiiboFile);
|
SaveAmiiboFile(virtualAmiiboFile);
|
||||||
|
@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService
|
|||||||
{
|
{
|
||||||
static class GeneralServiceManager
|
static class GeneralServiceManager
|
||||||
{
|
{
|
||||||
private static readonly List<GeneralServiceDetail> _generalServices = new();
|
private static readonly List<GeneralServiceDetail> _generalServices = [];
|
||||||
|
|
||||||
public static int Count
|
public static int Count
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||||||
|
|
||||||
private ulong _addOnContentBaseId;
|
private ulong _addOnContentBaseId;
|
||||||
|
|
||||||
private readonly List<ulong> _mountedAocTitleIds = new();
|
private readonly List<ulong> _mountedAocTitleIds = [];
|
||||||
|
|
||||||
public IAddOnContentManager(ServiceCtx context)
|
public IAddOnContentManager(ServiceCtx context)
|
||||||
{
|
{
|
||||||
|
@ -25,11 +25,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||||||
[Service("nvdrv:t")]
|
[Service("nvdrv:t")]
|
||||||
class INvDrvServices : IpcService
|
class INvDrvServices : IpcService
|
||||||
{
|
{
|
||||||
private static readonly List<string> _deviceFileDebugRegistry = new()
|
private static readonly List<string> _deviceFileDebugRegistry =
|
||||||
{
|
[
|
||||||
"/dev/nvhost-dbg-gpu",
|
"/dev/nvhost-dbg-gpu",
|
||||||
"/dev/nvhost-prof-gpu",
|
"/dev/nvhost-prof-gpu"
|
||||||
};
|
];
|
||||||
|
|
||||||
private static readonly Dictionary<string, Type> _deviceFileRegistry = new()
|
private static readonly Dictionary<string, Type> _deviceFileRegistry = new()
|
||||||
{
|
{
|
||||||
@ -73,9 +73,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||||||
|
|
||||||
if (_deviceFileRegistry.TryGetValue(path, out Type deviceFileClass))
|
if (_deviceFileRegistry.TryGetValue(path, out Type deviceFileClass))
|
||||||
{
|
{
|
||||||
ConstructorInfo constructor = deviceFileClass.GetConstructor(new[] { typeof(ServiceCtx), typeof(IVirtualMemoryManager), typeof(ulong) });
|
ConstructorInfo constructor = deviceFileClass.GetConstructor([typeof(ServiceCtx), typeof(IVirtualMemoryManager), typeof(ulong)
|
||||||
|
]);
|
||||||
|
|
||||||
NvDeviceFile deviceFile = (NvDeviceFile)constructor.Invoke(new object[] { context, _clientMemory, _owner });
|
NvDeviceFile deviceFile = (NvDeviceFile)constructor.Invoke([context, _clientMemory, _owner]);
|
||||||
|
|
||||||
deviceFile.Path = path;
|
deviceFile.Path = path;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu
|
|||||||
private const uint SmallPageSize = 0x1000;
|
private const uint SmallPageSize = 0x1000;
|
||||||
private const uint BigPageSize = 0x10000;
|
private const uint BigPageSize = 0x10000;
|
||||||
|
|
||||||
private static readonly uint[] _pageSizes = { SmallPageSize, BigPageSize };
|
private static readonly uint[] _pageSizes = [SmallPageSize, BigPageSize];
|
||||||
|
|
||||||
private const ulong SmallRegionLimit = 0x400000000UL; // 16 GiB
|
private const ulong SmallRegionLimit = 0x400000000UL; // 16 GiB
|
||||||
private const ulong DefaultUserSize = 1UL << 37;
|
private const ulong DefaultUserSize = 1UL << 37;
|
||||||
@ -32,10 +32,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly VmRegion[] _vmRegions = {
|
private static readonly VmRegion[] _vmRegions =
|
||||||
|
[
|
||||||
new((ulong)BigPageSize << 16, SmallRegionLimit),
|
new((ulong)BigPageSize << 16, SmallRegionLimit),
|
||||||
new(SmallRegionLimit, DefaultUserSize),
|
new(SmallRegionLimit, DefaultUserSize)
|
||||||
};
|
];
|
||||||
|
|
||||||
private readonly AddressSpaceContext _asContext;
|
private readonly AddressSpaceContext _asContext;
|
||||||
private readonly NvMemoryAllocator _memoryAllocator;
|
private readonly NvMemoryAllocator _memoryAllocator;
|
||||||
|
@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||||||
private readonly TreeDictionary<ulong, ulong> _tree = new();
|
private readonly TreeDictionary<ulong, ulong> _tree = new();
|
||||||
|
|
||||||
private readonly Dictionary<ulong, LinkedListNode<ulong>> _dictionary = new();
|
private readonly Dictionary<ulong, LinkedListNode<ulong>> _dictionary = new();
|
||||||
private readonly LinkedList<ulong> _list = new();
|
private readonly LinkedList<ulong> _list = [];
|
||||||
|
|
||||||
public NvMemoryAllocator()
|
public NvMemoryAllocator()
|
||||||
{
|
{
|
||||||
|
@ -12,15 +12,16 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst.ClkrstManager
|
|||||||
#pragma warning restore IDE0052
|
#pragma warning restore IDE0052
|
||||||
private uint _clockRate;
|
private uint _clockRate;
|
||||||
|
|
||||||
private readonly DeviceCode[] _allowedDeviceCodeTable = {
|
private readonly DeviceCode[] _allowedDeviceCodeTable =
|
||||||
|
[
|
||||||
DeviceCode.Cpu, DeviceCode.Gpu, DeviceCode.Disp1, DeviceCode.Disp2,
|
DeviceCode.Cpu, DeviceCode.Gpu, DeviceCode.Disp1, DeviceCode.Disp2,
|
||||||
DeviceCode.Tsec, DeviceCode.Mselect, DeviceCode.Sor1, DeviceCode.Host1x,
|
DeviceCode.Tsec, DeviceCode.Mselect, DeviceCode.Sor1, DeviceCode.Host1x,
|
||||||
DeviceCode.Vic, DeviceCode.Nvenc, DeviceCode.Nvjpg, DeviceCode.Nvdec,
|
DeviceCode.Vic, DeviceCode.Nvenc, DeviceCode.Nvjpg, DeviceCode.Nvdec,
|
||||||
DeviceCode.Ape, DeviceCode.AudioDsp, DeviceCode.Emc, DeviceCode.Dsi,
|
DeviceCode.Ape, DeviceCode.AudioDsp, DeviceCode.Emc, DeviceCode.Dsi,
|
||||||
DeviceCode.SysBus, DeviceCode.XusbSs, DeviceCode.XusbHost, DeviceCode.XusbDevice,
|
DeviceCode.SysBus, DeviceCode.XusbSs, DeviceCode.XusbHost, DeviceCode.XusbDevice,
|
||||||
DeviceCode.Gpuaux, DeviceCode.Pcie, DeviceCode.Apbdma, DeviceCode.Sdmmc1,
|
DeviceCode.Gpuaux, DeviceCode.Pcie, DeviceCode.Apbdma, DeviceCode.Sdmmc1,
|
||||||
DeviceCode.Sdmmc2, DeviceCode.Sdmmc4,
|
DeviceCode.Sdmmc2, DeviceCode.Sdmmc4
|
||||||
};
|
];
|
||||||
|
|
||||||
public IClkrstSession(DeviceCode deviceCode, uint unknown)
|
public IClkrstSession(DeviceCode deviceCode, uint unknown)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||||||
return ResultCode.InvalidSize;
|
return ResultCode.InvalidSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<byte[]> hashes = new();
|
List<byte[]> hashes = [];
|
||||||
|
|
||||||
for (int i = 0; i < header.HashesCount; i++)
|
for (int i = 0; i < header.HashesCount; i++)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService
|
|||||||
|
|
||||||
PlayLogQueryCapability queryCapability = (PlayLogQueryCapability)context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryCapability;
|
PlayLogQueryCapability queryCapability = (PlayLogQueryCapability)context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryCapability;
|
||||||
|
|
||||||
List<ulong> titleIds = new();
|
List<ulong> titleIds = [];
|
||||||
|
|
||||||
for (ulong i = 0; i < inputSize / sizeof(ulong); i++)
|
for (ulong i = 0; i < inputSize / sizeof(ulong); i++)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
static class KeyCodeMaps
|
static class KeyCodeMaps
|
||||||
{
|
{
|
||||||
public static byte[] Default =
|
public static byte[] Default =
|
||||||
{
|
[
|
||||||
0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
|
0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -345,11 +345,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] EnglishUsInternational =
|
public static byte[] EnglishUsInternational =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -691,11 +691,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] EnglishUk =
|
public static byte[] EnglishUk =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -1037,11 +1037,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] French =
|
public static byte[] French =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -1383,11 +1383,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] FrenchCa =
|
public static byte[] FrenchCa =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -1729,11 +1729,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] Spanish =
|
public static byte[] Spanish =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -2075,11 +2075,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] SpanishLatin =
|
public static byte[] SpanishLatin =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -2421,11 +2421,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] German =
|
public static byte[] German =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -2767,11 +2767,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] Italian =
|
public static byte[] Italian =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -3113,11 +3113,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] Portuguese =
|
public static byte[] Portuguese =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -3459,11 +3459,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] Russian =
|
public static byte[] Russian =
|
||||||
{
|
[
|
||||||
0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -3805,11 +3805,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] Korean =
|
public static byte[] Korean =
|
||||||
{
|
[
|
||||||
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -4151,11 +4151,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] ChineseSimplified =
|
public static byte[] ChineseSimplified =
|
||||||
{
|
[
|
||||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -4497,11 +4497,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
|
|
||||||
public static byte[] ChineseTraditional =
|
public static byte[] ChineseTraditional =
|
||||||
{
|
[
|
||||||
0x61, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
0x61, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -4843,7 +4843,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||||||
|
|
||||||
private BsdContext()
|
private BsdContext()
|
||||||
{
|
{
|
||||||
_fds = new List<IFileDescriptor>();
|
_fds = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISocket RetrieveSocket(int socketFd)
|
public ISocket RetrieveSocket(int socketFd)
|
||||||
@ -47,7 +47,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||||||
|
|
||||||
public List<IFileDescriptor> RetrieveFileDescriptorsFromMask(ReadOnlySpan<byte> mask)
|
public List<IFileDescriptor> RetrieveFileDescriptorsFromMask(ReadOnlySpan<byte> mask)
|
||||||
{
|
{
|
||||||
List<IFileDescriptor> fds = new();
|
List<IFileDescriptor> fds = [];
|
||||||
|
|
||||||
for (int i = 0; i < mask.Length; i++)
|
for (int i = 0; i < mask.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -16,11 +16,11 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||||||
[Service("bsd:u", false)]
|
[Service("bsd:u", false)]
|
||||||
class IClient : IpcService
|
class IClient : IpcService
|
||||||
{
|
{
|
||||||
private static readonly List<IPollManager> _pollManagers = new()
|
private static readonly List<IPollManager> _pollManagers =
|
||||||
{
|
[
|
||||||
EventFileDescriptorPollManager.Instance,
|
EventFileDescriptorPollManager.Instance,
|
||||||
ManagedSocketPollManager.Instance,
|
ManagedSocketPollManager.Instance
|
||||||
};
|
];
|
||||||
|
|
||||||
private BsdContext _context;
|
private BsdContext _context;
|
||||||
private readonly bool _isPrivileged;
|
private readonly bool _isPrivileged;
|
||||||
@ -265,7 +265,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||||||
|
|
||||||
for (int i = 0; i < eventsByPollManager.Length; i++)
|
for (int i = 0; i < eventsByPollManager.Length; i++)
|
||||||
{
|
{
|
||||||
eventsByPollManager[i] = new List<PollEvent>();
|
eventsByPollManager[i] = [];
|
||||||
|
|
||||||
foreach (PollEvent evnt in events)
|
foreach (PollEvent evnt in events)
|
||||||
{
|
{
|
||||||
@ -361,12 +361,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||||||
events[i] = new PollEvent(pollEventData, fileDescriptor);
|
events[i] = new PollEvent(pollEventData, fileDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PollEvent> discoveredEvents = new();
|
List<PollEvent> discoveredEvents = [];
|
||||||
List<PollEvent>[] eventsByPollManager = new List<PollEvent>[_pollManagers.Count];
|
List<PollEvent>[] eventsByPollManager = new List<PollEvent>[_pollManagers.Count];
|
||||||
|
|
||||||
for (int i = 0; i < eventsByPollManager.Length; i++)
|
for (int i = 0; i < eventsByPollManager.Length; i++)
|
||||||
{
|
{
|
||||||
eventsByPollManager[i] = new List<PollEvent>();
|
eventsByPollManager[i] = [];
|
||||||
|
|
||||||
foreach (PollEvent evnt in events)
|
foreach (PollEvent evnt in events)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
|||||||
{
|
{
|
||||||
updatedCount = 0;
|
updatedCount = 0;
|
||||||
|
|
||||||
List<ManualResetEvent> waiters = new();
|
List<ManualResetEvent> waiters = [];
|
||||||
|
|
||||||
for (int i = 0; i < events.Count; i++)
|
for (int i = 0; i < events.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -27,9 +27,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
|||||||
|
|
||||||
public LinuxError Poll(List<PollEvent> events, int timeoutMilliseconds, out int updatedCount)
|
public LinuxError Poll(List<PollEvent> events, int timeoutMilliseconds, out int updatedCount)
|
||||||
{
|
{
|
||||||
List<ISocketImpl> readEvents = new();
|
List<ISocketImpl> readEvents = [];
|
||||||
List<ISocketImpl> writeEvents = new();
|
List<ISocketImpl> writeEvents = [];
|
||||||
List<ISocketImpl> errorEvents = new();
|
List<ISocketImpl> errorEvents = [];
|
||||||
|
|
||||||
updatedCount = 0;
|
updatedCount = 0;
|
||||||
|
|
||||||
@ -123,9 +123,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
|||||||
|
|
||||||
public LinuxError Select(List<PollEvent> events, int timeout, out int updatedCount)
|
public LinuxError Select(List<PollEvent> events, int timeout, out int updatedCount)
|
||||||
{
|
{
|
||||||
List<ISocketImpl> readEvents = new();
|
List<ISocketImpl> readEvents = [];
|
||||||
List<ISocketImpl> writeEvents = new();
|
List<ISocketImpl> writeEvents = [];
|
||||||
List<ISocketImpl> errorEvents = new();
|
List<ISocketImpl> errorEvents = [];
|
||||||
|
|
||||||
updatedCount = 0;
|
updatedCount = 0;
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres
|
|||||||
|
|
||||||
private static List<AddrInfoSerialized> DeserializeAddrInfos(IVirtualMemoryManager memory, ulong address, ulong size)
|
private static List<AddrInfoSerialized> DeserializeAddrInfos(IVirtualMemoryManager memory, ulong address, ulong size)
|
||||||
{
|
{
|
||||||
List<AddrInfoSerialized> result = new();
|
List<AddrInfoSerialized> result = [];
|
||||||
|
|
||||||
ReadOnlySpan<byte> data = memory.GetSpan(address, (int)size);
|
ReadOnlySpan<byte> data = memory.GetSpan(address, (int)size);
|
||||||
|
|
||||||
|
@ -19,14 +19,15 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
|
|||||||
[GeneratedRegex(@"^accounts\.nintendo\.com$", RegexOpts)]
|
[GeneratedRegex(@"^accounts\.nintendo\.com$", RegexOpts)]
|
||||||
private static partial Regex BlockedHost6();
|
private static partial Regex BlockedHost6();
|
||||||
|
|
||||||
private static readonly Regex[] _blockedHosts = {
|
private static readonly Regex[] _blockedHosts =
|
||||||
|
[
|
||||||
BlockedHost1(),
|
BlockedHost1(),
|
||||||
BlockedHost2(),
|
BlockedHost2(),
|
||||||
BlockedHost3(),
|
BlockedHost3(),
|
||||||
BlockedHost4(),
|
BlockedHost4(),
|
||||||
BlockedHost5(),
|
BlockedHost5(),
|
||||||
BlockedHost6(),
|
BlockedHost6()
|
||||||
};
|
];
|
||||||
|
|
||||||
public static bool IsHostBlocked(string host)
|
public static bool IsHostBlocked(string host)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] entry = line.Split(new[] { ' ', '\t' }, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
|
string[] entry = line.Split([' ', '\t'], StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
// Hosts file example entry:
|
// Hosts file example entry:
|
||||||
// 127.0.0.1 localhost loopback
|
// 127.0.0.1 localhost loopback
|
||||||
@ -92,9 +92,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
|
|||||||
|
|
||||||
return new IPHostEntry
|
return new IPHostEntry
|
||||||
{
|
{
|
||||||
AddressList = new[] { hostEntry.Value },
|
AddressList = [hostEntry.Value],
|
||||||
HostName = hostEntry.Key,
|
HostName = hostEntry.Key,
|
||||||
Aliases = Array.Empty<string>(),
|
Aliases = [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
ConsumerListener = null;
|
ConsumerListener = null;
|
||||||
ConsumerUsageBits = 0;
|
ConsumerUsageBits = 0;
|
||||||
|
|
||||||
Queue = new List<BufferItem>();
|
Queue = [];
|
||||||
|
|
||||||
// TODO: CreateGraphicBufferAlloc?
|
// TODO: CreateGraphicBufferAlloc?
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
|
|||||||
|
|
||||||
public SystemClockContextUpdateCallback()
|
public SystemClockContextUpdateCallback()
|
||||||
{
|
{
|
||||||
_operationEventList = new List<KWritableEvent>();
|
_operationEventList = [];
|
||||||
Context = new SystemClockContext();
|
Context = new SystemClockContext();
|
||||||
_hasContext = false;
|
_hasContext = false;
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,12 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
private const long AverageSecondsPerYear = 31556952;
|
private const long AverageSecondsPerYear = 31556952;
|
||||||
private const long SecondsPerRepeat = YearsPerRepeat * AverageSecondsPerYear;
|
private const long SecondsPerRepeat = YearsPerRepeat * AverageSecondsPerYear;
|
||||||
|
|
||||||
private static readonly int[] _yearLengths = { DaysPerNYear, DaysPerLYear };
|
private static readonly int[] _yearLengths = [DaysPerNYear, DaysPerLYear];
|
||||||
private static readonly int[][] _monthsLengths = {
|
private static readonly int[][] _monthsLengths =
|
||||||
new[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
|
[
|
||||||
new[] { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
|
[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
||||||
};
|
[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
||||||
|
];
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> TimeZoneDefaultRule => ",M4.1.0,M10.5.0"u8;
|
private static ReadOnlySpan<byte> TimeZoneDefaultRule => ",M4.1.0,M10.5.0"u8;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
|
|
||||||
StreamReader reader = new(binaryListFile.Get.AsStream());
|
StreamReader reader = new(binaryListFile.Get.AsStream());
|
||||||
|
|
||||||
List<string> locationNameList = new();
|
List<string> locationNameList = [];
|
||||||
|
|
||||||
string locationName;
|
string locationName;
|
||||||
while ((locationName = reader.ReadLine()) != null)
|
while ((locationName = reader.ReadLine()) != null)
|
||||||
@ -112,7 +112,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LocationNameCache = new[] { "UTC" };
|
LocationNameCache = ["UTC"];
|
||||||
|
|
||||||
Logger.Error?.Print(LogClass.ServiceTime, TimeZoneSystemTitleMissingErrorMessage);
|
Logger.Error?.Print(LogClass.ServiceTime, TimeZoneSystemTitleMissingErrorMessage);
|
||||||
}
|
}
|
||||||
@ -124,10 +124,10 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
|
|
||||||
if (string.IsNullOrEmpty(tzBinaryContentPath))
|
if (string.IsNullOrEmpty(tzBinaryContentPath))
|
||||||
{
|
{
|
||||||
return new[] { (0, "UTC", "UTC") };
|
return [(0, "UTC", "UTC")];
|
||||||
}
|
}
|
||||||
|
|
||||||
List<(int Offset, string Location, string Abbr)> outList = new();
|
List<(int Offset, string Location, string Abbr)> outList = [];
|
||||||
long now = DateTimeOffset.Now.ToUnixTimeSeconds();
|
long now = DateTimeOffset.Now.ToUnixTimeSeconds();
|
||||||
using (IStorage ncaStorage = new LocalStorage(VirtualFileSystem.SwitchPathToSystemPath(tzBinaryContentPath), FileAccess.Read, FileMode.Open))
|
using (IStorage ncaStorage = new LocalStorage(VirtualFileSystem.SwitchPathToSystemPath(tzBinaryContentPath), FileAccess.Read, FileMode.Open))
|
||||||
using (IFileSystem romfs = new Nca(_virtualFileSystem.KeySet, ncaStorage).OpenFileSystem(NcaSectionType.Data, _fsIntegrityCheckLevel))
|
using (IFileSystem romfs = new Nca(_virtualFileSystem.KeySet, ncaStorage).OpenFileSystem(NcaSectionType.Data, _fsIntegrityCheckLevel))
|
||||||
@ -217,7 +217,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
|
|
||||||
public ResultCode LoadLocationNameList(uint index, out string[] outLocationNameArray, uint maxLength)
|
public ResultCode LoadLocationNameList(uint index, out string[] outLocationNameArray, uint maxLength)
|
||||||
{
|
{
|
||||||
List<string> locationNameList = new();
|
List<string> locationNameList = [];
|
||||||
|
|
||||||
for (int i = 0; i < LocationNameCache.Length && i < maxLength; i++)
|
for (int i = 0; i < LocationNameCache.Length && i < maxLength; i++)
|
||||||
{
|
{
|
||||||
@ -231,7 +231,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||||||
// If the location name is too long, error out.
|
// If the location name is too long, error out.
|
||||||
if (locationName.Length > 0x24)
|
if (locationName.Length > 0x24)
|
||||||
{
|
{
|
||||||
outLocationNameArray = Array.Empty<string>();
|
outLocationNameArray = [];
|
||||||
|
|
||||||
return ResultCode.LocationNameTooLong;
|
return ResultCode.LocationNameTooLong;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
|
|||||||
public IApplicationDisplayService(ViServiceType serviceType)
|
public IApplicationDisplayService(ViServiceType serviceType)
|
||||||
{
|
{
|
||||||
_serviceType = serviceType;
|
_serviceType = serviceType;
|
||||||
_displayInfo = new List<DisplayInfo>();
|
_displayInfo = [];
|
||||||
_openDisplays = new Dictionary<ulong, DisplayState>();
|
_openDisplays = new Dictionary<ulong, DisplayState>();
|
||||||
|
|
||||||
void AddDisplayInfo(string name, bool layerLimitEnabled, ulong layerLimitMax, ulong width, ulong height)
|
void AddDisplayInfo(string name, bool layerLimitEnabled, ulong layerLimitMax, ulong width, ulong height)
|
||||||
|
@ -4,7 +4,8 @@ namespace Ryujinx.HLE.HOS.SystemState
|
|||||||
{
|
{
|
||||||
public class SystemStateMgr
|
public class SystemStateMgr
|
||||||
{
|
{
|
||||||
internal static string[] LanguageCodes = {
|
internal static string[] LanguageCodes =
|
||||||
|
[
|
||||||
"ja",
|
"ja",
|
||||||
"en-US",
|
"en-US",
|
||||||
"fr",
|
"fr",
|
||||||
@ -22,8 +23,8 @@ namespace Ryujinx.HLE.HOS.SystemState
|
|||||||
"es-419",
|
"es-419",
|
||||||
"zh-Hans",
|
"zh-Hans",
|
||||||
"zh-Hant",
|
"zh-Hant",
|
||||||
"pt-BR",
|
"pt-BR"
|
||||||
};
|
];
|
||||||
|
|
||||||
internal long DesiredKeyboardLayout { get; private set; }
|
internal long DesiredKeyboardLayout { get; private set; }
|
||||||
|
|
||||||
|
@ -26,12 +26,13 @@ namespace Ryujinx.HLE.HOS.Tamper
|
|||||||
|
|
||||||
public ITamperProgram Compile(string name, IEnumerable<string> rawInstructions)
|
public ITamperProgram Compile(string name, IEnumerable<string> rawInstructions)
|
||||||
{
|
{
|
||||||
string[] addresses = {
|
string[] addresses =
|
||||||
|
[
|
||||||
$" Executable address: 0x{_exeAddress:X16}",
|
$" Executable address: 0x{_exeAddress:X16}",
|
||||||
$" Heap address : 0x{_heapAddress:X16}",
|
$" Heap address : 0x{_heapAddress:X16}",
|
||||||
$" Alias address : 0x{_aliasAddress:X16}",
|
$" Alias address : 0x{_aliasAddress:X16}",
|
||||||
$" Aslr address : 0x{_aslrAddress:X16}",
|
$" Aslr address : 0x{_aslrAddress:X16}"
|
||||||
};
|
];
|
||||||
|
|
||||||
Logger.Debug?.Print(LogClass.TamperMachine, $"Compiling Atmosphere cheat {name}...\n{string.Join('\n', addresses)}");
|
Logger.Debug?.Print(LogClass.TamperMachine, $"Compiling Atmosphere cheat {name}...\n{string.Join('\n', addresses)}");
|
||||||
|
|
||||||
|
@ -73,11 +73,11 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters
|
|||||||
|
|
||||||
void Emit(Type operationType, IOperand rhs = null)
|
void Emit(Type operationType, IOperand rhs = null)
|
||||||
{
|
{
|
||||||
List<IOperand> operandList = new()
|
List<IOperand> operandList =
|
||||||
{
|
[
|
||||||
destinationRegister,
|
destinationRegister,
|
||||||
leftHandSideRegister,
|
leftHandSideRegister
|
||||||
};
|
];
|
||||||
|
|
||||||
if (rhs != null)
|
if (rhs != null)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Tamper
|
|||||||
public OperationBlock(byte[] baseInstruction)
|
public OperationBlock(byte[] baseInstruction)
|
||||||
{
|
{
|
||||||
BaseInstruction = baseInstruction;
|
BaseInstruction = baseInstruction;
|
||||||
Operations = new List<IOperation>();
|
Operations = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
{
|
{
|
||||||
// Binaries from exefs are loaded into mem in this order. Do not change.
|
// Binaries from exefs are loaded into mem in this order. Do not change.
|
||||||
public static readonly string[] ExeFsPrefixes =
|
public static readonly string[] ExeFsPrefixes =
|
||||||
{
|
[
|
||||||
"rtld",
|
"rtld",
|
||||||
"main",
|
"main",
|
||||||
"subsdk0",
|
"subsdk0",
|
||||||
@ -17,8 +17,8 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
"subsdk7",
|
"subsdk7",
|
||||||
"subsdk8",
|
"subsdk8",
|
||||||
"subsdk9",
|
"subsdk9",
|
||||||
"sdk",
|
"sdk"
|
||||||
};
|
];
|
||||||
|
|
||||||
public const string MainNpdmPath = "/main.npdm";
|
public const string MainNpdmPath = "/main.npdm";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user