mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 06:46:24 +02:00
Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)"
This reverts merge request !47
This commit is contained in:
parent
faf9e3cdd7
commit
77a797f154
307 changed files with 1245 additions and 1016 deletions
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ControllerSupportArgHeader
|
||||
{
|
||||
|
@ -14,4 +14,5 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
public byte EnableSingleMode;
|
||||
public byte EnableIdentificationColor;
|
||||
}
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
struct ControllerSupportArgPrivate
|
||||
{
|
||||
public uint PrivateSize;
|
||||
|
@ -12,4 +12,5 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
public uint NpadStyleSet;
|
||||
public uint NpadJoyHoldType;
|
||||
}
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
// (8.0.0+ version)
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ControllerSupportArgV7
|
||||
|
@ -22,4 +22,5 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref element, 8 * 0x81);
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
// (1.0.0+ version)
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ControllerSupportArgVPre7
|
||||
|
@ -22,4 +22,5 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref element, 4 * 0x81);
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ControllerSupportResultInfo
|
||||
{
|
||||
|
@ -12,4 +12,5 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
public uint SelectedId;
|
||||
public uint Result;
|
||||
}
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
|||
{
|
||||
return systemLanguage switch
|
||||
{
|
||||
#pragma warning disable IDE0055 // Disable formatting
|
||||
#pragma warning disable IDE0055 // Disable formatting
|
||||
SystemLanguage.Japanese => "ja",
|
||||
SystemLanguage.AmericanEnglish => "en-US",
|
||||
SystemLanguage.French => "fr",
|
||||
|
|
|
@ -12,8 +12,9 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
private readonly Horizon _system;
|
||||
|
||||
private AppletSession _normalSession;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private AppletSession _interactiveSession;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public event EventHandler AppletStateChanged;
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
private SoftwareKeyboardConfig _keyboardForegroundConfig;
|
||||
|
||||
// Configuration for background (inline) mode.
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private SoftwareKeyboardInitialize _keyboardBackgroundInitialize;
|
||||
private SoftwareKeyboardCustomizeDic _keyboardBackgroundDic;
|
||||
private SoftwareKeyboardDictSet _keyboardBackgroundDictSet;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private SoftwareKeyboardUserWord[] _keyboardBackgroundUserWords;
|
||||
|
||||
private byte[] _transferMemory;
|
||||
|
|
|
@ -6,8 +6,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
|||
{
|
||||
// TODO: Compute inside the Demangler
|
||||
public BaseNode Reference;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly int _index;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public ForwardTemplateReference(int index) : base(NodeType.ForwardTemplateReference)
|
||||
{
|
||||
|
|
|
@ -36,10 +36,11 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using TimeServiceManager = Ryujinx.HLE.HOS.Services.Time.TimeManager;
|
||||
|
||||
namespace Ryujinx.HLE.HOS
|
||||
{
|
||||
using TimeServiceManager = Services.Time.TimeManager;
|
||||
|
||||
public class Horizon : IDisposable
|
||||
{
|
||||
internal const int HidSize = 0x40000;
|
||||
|
|
|
@ -4,8 +4,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||
{
|
||||
class KLightClientSession : KAutoObject
|
||||
{
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly KLightSession _parent;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public KLightClientSession(KernelContext context, KLightSession parent) : base(context)
|
||||
{
|
||||
|
|
|
@ -4,8 +4,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||
{
|
||||
class KLightServerSession : KAutoObject
|
||||
{
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly KLightSession _parent;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public KLightServerSession(KernelContext context, KLightSession parent) : base(context)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
|||
public KServerPort ServerPort { get; }
|
||||
public KClientPort ClientPort { get; }
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly string _name;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
private readonly ChannelState _state;
|
||||
|
||||
|
|
|
@ -86,10 +86,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
|
||||
private static readonly int[] _memoryBlockPageShifts = [12, 16, 21, 22, 25, 29, 30];
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly ulong _heapAddress;
|
||||
private readonly ulong _heapSize;
|
||||
private ulong _usedSize;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private readonly int _blocksCount;
|
||||
private readonly Block[] _blocks;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
using Ryujinx.HLE.HOS.Kernel.Memory;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
struct MemoryInfo
|
||||
{
|
||||
public ulong Address;
|
||||
|
@ -13,7 +11,9 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
public KMemoryPermission Permission;
|
||||
public int IpcRefCount;
|
||||
public int DeviceRefCount;
|
||||
#pragma warning disable CS0414, IDE0052 // Remove unread private member
|
||||
private readonly int _padding;
|
||||
#pragma warning restore CS0414, IDE0052
|
||||
|
||||
public MemoryInfo(
|
||||
ulong address,
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x5f)]
|
||||
public static Result FlushProcessDataCache(int processHandle, ulong address, ulong size)
|
||||
public Result FlushProcessDataCache(int processHandle, ulong address, ulong size)
|
||||
{
|
||||
// FIXME: This needs to be implemented as ARMv7 doesn't have any way to do cache maintenance operations on EL0.
|
||||
// As we don't support (and don't actually need) to flush the cache, this is stubbed.
|
||||
|
@ -263,7 +263,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x22)]
|
||||
public static Result SendSyncRequestWithUserBuffer(
|
||||
public Result SendSyncRequestWithUserBuffer(
|
||||
[PointerSized] ulong messagePtr,
|
||||
[PointerSized] ulong messageSize,
|
||||
int handle)
|
||||
|
@ -901,7 +901,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(2)]
|
||||
public static Result SetMemoryPermission([PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
public Result SetMemoryPermission([PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -934,7 +934,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(3)]
|
||||
public static Result SetMemoryAttribute(
|
||||
public Result SetMemoryAttribute(
|
||||
[PointerSized] ulong address,
|
||||
[PointerSized] ulong size,
|
||||
MemoryAttribute attributeMask,
|
||||
|
@ -983,7 +983,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(4)]
|
||||
public static Result MapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||
public Result MapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(src | dst))
|
||||
{
|
||||
|
@ -1020,7 +1020,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(5)]
|
||||
public static Result UnmapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||
public Result UnmapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(src | dst))
|
||||
{
|
||||
|
@ -1057,7 +1057,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(6)]
|
||||
public static Result QueryMemory([PointerSized] ulong infoPtr, [PointerSized] out ulong pageInfo, [PointerSized] ulong address)
|
||||
public Result QueryMemory([PointerSized] ulong infoPtr, [PointerSized] out ulong pageInfo, [PointerSized] ulong address)
|
||||
{
|
||||
Result result = QueryMemory(out MemoryInfo info, out pageInfo, address);
|
||||
|
||||
|
@ -1092,7 +1092,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x13)]
|
||||
public static Result MapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
public Result MapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1139,7 +1139,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x14)]
|
||||
public static Result UnmapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||
public Result UnmapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1244,7 +1244,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x51)]
|
||||
public static Result MapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
public Result MapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1291,7 +1291,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x52)]
|
||||
public static Result UnmapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||
public Result UnmapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1332,7 +1332,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x2c)]
|
||||
public static Result MapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||
public Result MapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1368,7 +1368,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x2d)]
|
||||
public static Result UnmapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||
public Result UnmapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||
{
|
||||
if (!PageAligned(address))
|
||||
{
|
||||
|
@ -1445,7 +1445,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x4c)]
|
||||
public static Result ControlCodeMemory(
|
||||
public Result ControlCodeMemory(
|
||||
int handle,
|
||||
CodeMemoryOperation op,
|
||||
ulong address,
|
||||
|
@ -1524,7 +1524,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x73)]
|
||||
public static Result SetProcessMemoryPermission(
|
||||
public Result SetProcessMemoryPermission(
|
||||
int handle,
|
||||
ulong src,
|
||||
ulong size,
|
||||
|
@ -1566,7 +1566,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x74)]
|
||||
public static Result MapProcessMemory(
|
||||
public Result MapProcessMemory(
|
||||
[PointerSized] ulong dst,
|
||||
int handle,
|
||||
ulong src,
|
||||
|
@ -1623,7 +1623,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x75)]
|
||||
public static Result UnmapProcessMemory(
|
||||
public Result UnmapProcessMemory(
|
||||
[PointerSized] ulong dst,
|
||||
int handle,
|
||||
ulong src,
|
||||
|
@ -1669,7 +1669,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x77)]
|
||||
public static Result MapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||
public Result MapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||
{
|
||||
if (!PageAligned(dst) || !PageAligned(src))
|
||||
{
|
||||
|
@ -1707,7 +1707,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x78)]
|
||||
public static Result UnmapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||
public Result UnmapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||
{
|
||||
if (!PageAligned(dst) || !PageAligned(src))
|
||||
{
|
||||
|
@ -1752,7 +1752,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
// System
|
||||
|
||||
[Svc(0x7b)]
|
||||
public static Result TerminateProcess(int handle)
|
||||
public Result TerminateProcess(int handle)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(7)]
|
||||
public static void ExitProcess()
|
||||
public void ExitProcess()
|
||||
{
|
||||
KernelStatic.GetCurrentProcess().TerminateCurrentProcess();
|
||||
}
|
||||
|
@ -1878,7 +1878,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x26)]
|
||||
public static void Break(ulong reason)
|
||||
public void Break(ulong reason)
|
||||
{
|
||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||
|
||||
|
@ -1905,7 +1905,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x27)]
|
||||
public static void OutputDebugString([PointerSized] ulong strPtr, [PointerSized] ulong size)
|
||||
public void OutputDebugString([PointerSized] ulong strPtr, [PointerSized] ulong size)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2371,7 +2371,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x30)]
|
||||
public static Result GetResourceLimitLimitValue(out long limitValue, int handle, LimitableResource resource)
|
||||
public Result GetResourceLimitLimitValue(out long limitValue, int handle, LimitableResource resource)
|
||||
{
|
||||
limitValue = 0;
|
||||
|
||||
|
@ -2393,7 +2393,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x31)]
|
||||
public static Result GetResourceLimitCurrentValue(out long limitValue, int handle, LimitableResource resource)
|
||||
public Result GetResourceLimitCurrentValue(out long limitValue, int handle, LimitableResource resource)
|
||||
{
|
||||
limitValue = 0;
|
||||
|
||||
|
@ -2415,7 +2415,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x37)]
|
||||
public static Result GetResourceLimitPeakValue(out long peak, int handle, LimitableResource resource)
|
||||
public Result GetResourceLimitPeakValue(out long peak, int handle, LimitableResource resource)
|
||||
{
|
||||
peak = 0;
|
||||
|
||||
|
@ -2447,7 +2447,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x7e)]
|
||||
public static Result SetResourceLimitLimitValue(int handle, LimitableResource resource, long limitValue)
|
||||
public Result SetResourceLimitLimitValue(int handle, LimitableResource resource, long limitValue)
|
||||
{
|
||||
if (resource >= LimitableResource.Count)
|
||||
{
|
||||
|
@ -2542,7 +2542,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(9)]
|
||||
public static Result StartThread(int handle)
|
||||
public Result StartThread(int handle)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2570,7 +2570,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0xa)]
|
||||
public static void ExitThread()
|
||||
public void ExitThread()
|
||||
{
|
||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||
|
||||
|
@ -2602,7 +2602,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0xc)]
|
||||
public static Result GetThreadPriority(out int priority, int handle)
|
||||
public Result GetThreadPriority(out int priority, int handle)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2623,7 +2623,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0xd)]
|
||||
public static Result SetThreadPriority(int handle, int priority)
|
||||
public Result SetThreadPriority(int handle, int priority)
|
||||
{
|
||||
// TODO: NPDM check.
|
||||
|
||||
|
@ -2642,7 +2642,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0xe)]
|
||||
public static Result GetThreadCoreMask(out int preferredCore, out ulong affinityMask, int handle)
|
||||
public Result GetThreadCoreMask(out int preferredCore, out ulong affinityMask, int handle)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2665,7 +2665,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0xf)]
|
||||
public static Result SetThreadCoreMask(int handle, int preferredCore, ulong affinityMask)
|
||||
public Result SetThreadCoreMask(int handle, int preferredCore, ulong affinityMask)
|
||||
{
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2714,13 +2714,13 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x10)]
|
||||
public static int GetCurrentProcessorNumber()
|
||||
public int GetCurrentProcessorNumber()
|
||||
{
|
||||
return KernelStatic.GetCurrentThread().CurrentCore;
|
||||
}
|
||||
|
||||
[Svc(0x25)]
|
||||
public static Result GetThreadId(out ulong threadUid, int handle)
|
||||
public Result GetThreadId(out ulong threadUid, int handle)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2741,7 +2741,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x32)]
|
||||
public static Result SetThreadActivity(int handle, bool pause)
|
||||
public Result SetThreadActivity(int handle, bool pause)
|
||||
{
|
||||
KProcess process = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -2766,7 +2766,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x33)]
|
||||
public static Result GetThreadContext3([PointerSized] ulong address, int handle)
|
||||
public Result GetThreadContext3([PointerSized] ulong address, int handle)
|
||||
{
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||
|
@ -2931,7 +2931,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x1a)]
|
||||
public static Result ArbitrateLock(int ownerHandle, [PointerSized] ulong mutexAddress, int requesterHandle)
|
||||
public Result ArbitrateLock(int ownerHandle, [PointerSized] ulong mutexAddress, int requesterHandle)
|
||||
{
|
||||
if (IsPointingInsideKernel(mutexAddress))
|
||||
{
|
||||
|
@ -2949,7 +2949,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x1b)]
|
||||
public static Result ArbitrateUnlock([PointerSized] ulong mutexAddress)
|
||||
public Result ArbitrateUnlock([PointerSized] ulong mutexAddress)
|
||||
{
|
||||
if (IsPointingInsideKernel(mutexAddress))
|
||||
{
|
||||
|
@ -2967,7 +2967,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x1c)]
|
||||
public static Result WaitProcessWideKeyAtomic(
|
||||
public Result WaitProcessWideKeyAtomic(
|
||||
[PointerSized] ulong mutexAddress,
|
||||
[PointerSized] ulong condVarAddress,
|
||||
int handle,
|
||||
|
@ -2998,7 +2998,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x1d)]
|
||||
public static Result SignalProcessWideKey([PointerSized] ulong address, int count)
|
||||
public Result SignalProcessWideKey([PointerSized] ulong address, int count)
|
||||
{
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
@ -3008,7 +3008,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x34)]
|
||||
public static Result WaitForAddress([PointerSized] ulong address, ArbitrationType type, int value, long timeout)
|
||||
public Result WaitForAddress([PointerSized] ulong address, ArbitrationType type, int value, long timeout)
|
||||
{
|
||||
if (IsPointingInsideKernel(address))
|
||||
{
|
||||
|
@ -3040,7 +3040,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x35)]
|
||||
public static Result SignalToAddress([PointerSized] ulong address, SignalType type, int value, int count)
|
||||
public Result SignalToAddress([PointerSized] ulong address, SignalType type, int value, int count)
|
||||
{
|
||||
if (IsPointingInsideKernel(address))
|
||||
{
|
||||
|
@ -3067,7 +3067,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
|
||||
[Svc(0x36)]
|
||||
public static Result SynchronizePreemptionState()
|
||||
public Result SynchronizePreemptionState()
|
||||
{
|
||||
KernelStatic.GetCurrentThread().SynchronizePreemptionState();
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
using ARMeilleure.State;
|
||||
using Ryujinx.Common.Memory;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ThreadContext
|
||||
{
|
||||
public Array29<ulong> Registers;
|
||||
|
@ -13,9 +11,9 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
public ulong Sp;
|
||||
public ulong Pc;
|
||||
public uint Pstate;
|
||||
|
||||
#pragma warning disable CS0169, IDE0051 // Remove unused private member
|
||||
private readonly uint _padding;
|
||||
|
||||
#pragma warning restore CS0169, IDE0051
|
||||
public Array32<V128> FpuRegisters;
|
||||
public uint Fpcr;
|
||||
public uint Fpsr;
|
||||
|
|
|
@ -7,6 +7,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -18,7 +19,9 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
|
|||
// TODO: Determine where and how NetworkServiceAccountId is set.
|
||||
private const long NetworkServiceAccountId = 0xcafe;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly UserId _userId;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
private byte[] _cachedTokenData;
|
||||
private DateTime _cachedTokenExpiry;
|
||||
|
@ -125,8 +128,9 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
|
|||
public ResultCode LoadIdTokenCache(ServiceCtx context)
|
||||
{
|
||||
ulong bufferPosition = context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong bufferSize = context.Request.ReceiveBuff[0].Size;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: This opens the file at "su/cache/USERID_IN_UUID_STRING.dat" (where USERID_IN_UUID_STRING is formatted as "%08x-%04x-%04x-%02x%02x-%08x%04x")
|
||||
// in the "account:/" savedata and writes some data in the buffer.
|
||||
|
@ -152,11 +156,6 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
|
|||
|
||||
byte[] tokenData = _cachedTokenData;
|
||||
|
||||
if ((ulong)tokenData.Length > bufferSize)
|
||||
{
|
||||
return ResultCode.InvalidIdTokenCacheBufferSize;
|
||||
}
|
||||
|
||||
context.Memory.Write(bufferPosition, tokenData);
|
||||
context.ResponseData.Write(tokenData.Length);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public readonly record struct UserId
|
||||
{
|
||||
public readonly long High;
|
||||
|
|
|
@ -10,8 +10,10 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
// SetExpectedMasterVolume(f32, f32)
|
||||
public ResultCode SetExpectedMasterVolume(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadSingle(); // applet volume
|
||||
_ = context.RequestData.ReadSingle(); // library applet volume
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
float appletVolume = context.RequestData.ReadSingle();
|
||||
float libraryAppletVolume = context.RequestData.ReadSingle();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
|
||||
|
@ -44,9 +46,10 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
// ChangeMainAppletMasterVolume(f32, u64)
|
||||
public ResultCode ChangeMainAppletMasterVolume(ServiceCtx context)
|
||||
{
|
||||
// Unknown parameters.
|
||||
_ = context.RequestData.ReadSingle();
|
||||
_ = context.RequestData.ReadInt64();
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
float unknown0 = context.RequestData.ReadSingle();
|
||||
long unknown1 = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
|
||||
|
@ -57,8 +60,9 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
// SetTransparentVolumeRate(f32)
|
||||
public ResultCode SetTransparentVolumeRate(ServiceCtx context)
|
||||
{
|
||||
// Unknown parameter.
|
||||
_ = context.RequestData.ReadSingle();
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
float unknown0 = context.RequestData.ReadSingle();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
|
||||
|
|
|
@ -18,8 +18,10 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
private readonly Apm.SystemManagerServer _apmSystemManagerServer;
|
||||
|
||||
private bool _vrModeEnabled;
|
||||
#pragma warning disable CS0414, IDE0052 // Remove unread private member
|
||||
private bool _lcdBacklighOffEnabled;
|
||||
private bool _requestExitToLibraryAppletAtExecuteNextProgramEnabled;
|
||||
#pragma warning restore CS0414, IDE0052
|
||||
private int _messageEventHandle;
|
||||
private int _displayResolutionChangedEventHandle;
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
public ResultCode CreateLibraryApplet(ServiceCtx context)
|
||||
{
|
||||
AppletId appletId = (AppletId)context.RequestData.ReadInt32();
|
||||
|
||||
_ = context.RequestData.ReadInt32(); // libraryAppletMode
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
int libraryAppletMode = context.RequestData.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
MakeObject(context, new ILibraryAppletAccessor(appletId, context.Device.System));
|
||||
|
||||
|
|
|
@ -25,21 +25,21 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||
private readonly ulong _accumulatedSuspendedTickValue = 0;
|
||||
|
||||
// TODO: Determine where those fields are used.
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private bool _screenShotPermission = false;
|
||||
private bool _operationModeChangedNotification = false;
|
||||
private bool _performanceModeChangedNotification = false;
|
||||
private bool _restartMessageEnabled = false;
|
||||
private bool _outOfFocusSuspendingEnabled = false;
|
||||
private bool _handlesRequestToDisplay = false;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private bool _autoSleepDisabled = false;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private bool _albumImageTakenNotificationEnabled = false;
|
||||
private bool _recordVolumeMuted = false;
|
||||
|
||||
private uint _screenShotImageOrientation = 0;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private uint _idleTimeDetectionExtension = 0;
|
||||
|
||||
public ISelfController(ServiceCtx context, ulong pid)
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
{
|
||||
try
|
||||
{
|
||||
Push(item);
|
||||
this.Push(item);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
|
||||
public bool TryTake(out T item)
|
||||
{
|
||||
return TryPop(out item);
|
||||
return this.TryPop(out item);
|
||||
}
|
||||
|
||||
public T Peek()
|
||||
|
@ -104,7 +104,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
CopyTo((T[])array, index);
|
||||
this.CopyTo((T[])array, index);
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
|
||||
public void Push(byte[] item)
|
||||
{
|
||||
if (!TryPush(item))
|
||||
if (!this.TryPush(item))
|
||||
{
|
||||
// TODO(jduncanator): Throw a proper exception
|
||||
throw new InvalidOperationException();
|
||||
|
@ -50,7 +50,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
|
||||
public byte[] Pop()
|
||||
{
|
||||
if (TryPop(out byte[] item))
|
||||
if (this.TryPop(out byte[] item))
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
|||
/// </summary>
|
||||
public AppletSession GetConsumer()
|
||||
{
|
||||
return new AppletSession(_outputData, _inputData);
|
||||
return new AppletSession(this._outputData, this._inputData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,9 @@ namespace Ryujinx.HLE.HOS.Services.Arp
|
|||
public int Version;
|
||||
public byte BaseGameStorageId;
|
||||
public byte UpdateGameStorageId;
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public short Padding;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
public static ApplicationLaunchProperty Default
|
||||
{
|
||||
|
|
|
@ -10,7 +10,9 @@ namespace Ryujinx.HLE.HOS.Services.Bluetooth
|
|||
[Service("btdrv")]
|
||||
class IBluetoothDriver : IpcService
|
||||
{
|
||||
#pragma warning disable CS0414, IDE0052 // Remove unread private member
|
||||
private string _unknownLowEnergy;
|
||||
#pragma warning restore CS0414, IDE0052
|
||||
|
||||
public IBluetoothDriver(ServiceCtx context) { }
|
||||
|
||||
|
|
|
@ -23,8 +23,9 @@ namespace Ryujinx.HLE.HOS.Services.Caps
|
|||
public ResultCode SetShimLibraryVersion(ServiceCtx context)
|
||||
{
|
||||
ulong shimLibraryVersion = context.RequestData.ReadUInt64();
|
||||
|
||||
_ = context.RequestData.ReadUInt64(); // applet Resource user id
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong appletResourceUserId = context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// TODO: Service checks if the pid is present in an internal list and returns ResultCode.BlacklistedPid if it is.
|
||||
// The list contents needs to be determined.
|
||||
|
|
|
@ -20,13 +20,15 @@ namespace Ryujinx.HLE.HOS.Services.Caps
|
|||
public ResultCode SaveScreenShotEx0(ServiceCtx context)
|
||||
{
|
||||
// TODO: Use the ScreenShotAttribute.
|
||||
_ = context.RequestData.ReadStruct<ScreenShotAttribute>(); // screenShotAttribute
|
||||
|
||||
_ = context.RequestData.ReadUInt32(); // unknown
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ScreenShotAttribute screenShotAttribute = context.RequestData.ReadStruct<ScreenShotAttribute>();
|
||||
|
||||
uint unknown = context.RequestData.ReadUInt32();
|
||||
#pragma warning restore IDE0059
|
||||
ulong appletResourceUserId = context.RequestData.ReadUInt64();
|
||||
|
||||
_ = context.RequestData.ReadUInt64(); // pid
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pidPlaceholder = context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
ulong screenshotDataPosition = context.Request.SendBuff[0].Position;
|
||||
ulong screenshotDataSize = context.Request.SendBuff[0].Size;
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace Ryujinx.HLE.HOS.Services.Fatal
|
|||
|
||||
Logger.Info?.Print(LogClass.ServiceFatal, errorReport.ToString());
|
||||
|
||||
Kernel.SupervisorCall.Syscall.Break((ulong)resultCode);
|
||||
context.Device.System.KernelContext.Syscall.Break((ulong)resultCode);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
|
|
@ -50,10 +50,10 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
// -> object<nn::fssrv::sf::IFileSystem> contentFs
|
||||
public ResultCode OpenFileSystemWithId(ServiceCtx context)
|
||||
{
|
||||
|
||||
_ = (FileSystemType)context.RequestData.ReadInt32(); // fileSystemType
|
||||
_ = context.RequestData.ReadUInt64(); // titleId
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
FileSystemType fileSystemType = (FileSystemType)context.RequestData.ReadInt32();
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
string switchPath = ReadUtf8String(context);
|
||||
string fullPath = FileSystem.VirtualFileSystem.SwitchPathToSystemPath(switchPath);
|
||||
|
||||
|
@ -793,9 +793,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
public ResultCode OpenDataStorageByDataId(ServiceCtx context)
|
||||
{
|
||||
StorageId storageId = (StorageId)context.RequestData.ReadByte();
|
||||
|
||||
_ = context.RequestData.ReadBytes(7); // Skip 7 bytes of padding.
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
byte[] padding = context.RequestData.ReadBytes(7);
|
||||
#pragma warning restore IDE0059
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
|
||||
// We do a mitm here to find if the request is for an AOC.
|
||||
|
|
|
@ -101,6 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
result |= (rightStick.Dy < -StickButtonThreshold) ? ControllerKeys.RStickDown : result;
|
||||
result |= (rightStick.Dy > StickButtonThreshold) ? ControllerKeys.RStickUp : result;
|
||||
#pragma warning restore IDE0055
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,6 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
|
||||
switch (type)
|
||||
{
|
||||
|
||||
#pragma warning disable IDE0055 // Disable formatting
|
||||
case ControllerType.ProController:
|
||||
controller.StyleSet = NpadStyleTag.FullKey;
|
||||
|
|
|
@ -8,7 +8,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid.HidServer
|
|||
// ActivateVibrationDevice(nn::hid::VibrationDeviceHandle)
|
||||
public ResultCode ActivateVibrationDevice(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt32(); // vibrationDeviceHandle
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
int vibrationDeviceHandle = context.RequestData.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
|
||||
private long _npadCommunicationMode;
|
||||
private uint _accelerometerPlayMode;
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
private readonly long _vibrationGcErmCommand;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
private float _sevenSixAxisSensorFusionStrength;
|
||||
|
||||
private SensorFusionParameters _sensorFusionParams;
|
||||
|
@ -64,7 +64,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// CreateAppletResource(nn::applet::AppletResourceUserId) -> object<nn::hid::IAppletResource>
|
||||
public ResultCode CreateAppletResource(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
MakeObject(context, new IAppletResource(context.Device.System.HidSharedMem));
|
||||
|
||||
|
@ -733,6 +735,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// GetSupportedNpadStyleSet(pid, nn::applet::AppletResourceUserId) -> uint nn::hid::NpadStyleTag
|
||||
public ResultCode GetSupportedNpadStyleSet(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
|
||||
context.ResponseData.Write((int)context.Device.Hid.Npads.SupportedStyleSets);
|
||||
|
@ -746,8 +751,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// SetSupportedNpadIdType(nn::applet::AppletResourceUserId, array<NpadIdType, 9>)
|
||||
public ResultCode SetSupportedNpadIdType(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
ulong arrayPosition = context.Request.PtrBuff[0].Position;
|
||||
ulong arraySize = context.Request.PtrBuff[0].Size;
|
||||
|
||||
|
@ -898,7 +904,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// SetNpadJoyHoldType(nn::applet::AppletResourceUserId, ulong NpadJoyHoldType)
|
||||
public ResultCode SetNpadJoyHoldType(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
NpadJoyHoldType npadJoyHoldType = (NpadJoyHoldType)context.RequestData.ReadUInt64();
|
||||
|
||||
|
@ -924,7 +932,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// GetNpadJoyHoldType(nn::applet::AppletResourceUserId) -> ulong NpadJoyHoldType
|
||||
public ResultCode GetNpadJoyHoldType(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
foreach (PlayerIndex playerIndex in context.Device.Hid.Npads.GetSupportedPlayers())
|
||||
{
|
||||
|
@ -945,8 +955,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
{
|
||||
NpadIdType npadIdType = (NpadIdType)context.RequestData.ReadUInt32();
|
||||
context.RequestData.BaseStream.Position += 4; // Padding
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
if (HidUtils.IsValidNpadIdType(npadIdType))
|
||||
{
|
||||
|
@ -979,8 +990,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
{
|
||||
NpadIdType npadIdType = (NpadIdType)context.RequestData.ReadUInt32();
|
||||
context.RequestData.BaseStream.Position += 4; // Padding
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
if (HidUtils.IsValidNpadIdType(npadIdType))
|
||||
{
|
||||
|
@ -1219,7 +1231,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
FrequencyHigh = context.RequestData.ReadSingle(),
|
||||
};
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
Dictionary<byte, VibrationValue> dualVibrationValues = new()
|
||||
{
|
||||
|
@ -1243,7 +1257,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
Reserved = context.RequestData.ReadByte(),
|
||||
};
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
VibrationValue vibrationValue = context.Device.Hid.Npads.GetLastVibrationValue((PlayerIndex)deviceHandle.PlayerId, deviceHandle.Position);
|
||||
|
||||
|
@ -1288,7 +1304,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// SendVibrationValues(nn::applet::AppletResourceUserId, buffer<array<nn::hid::VibrationDeviceHandle>, type: 9>, buffer<array<nn::hid::VibrationValue>, type: 9>)
|
||||
public ResultCode SendVibrationValues(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
byte[] vibrationDeviceHandleBuffer = new byte[context.Request.PtrBuff[0].Size];
|
||||
|
||||
|
@ -1378,8 +1396,10 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||
// IsVibrationDeviceMounted(nn::hid::VibrationDeviceHandle, nn::applet::AppletResourceUserId)
|
||||
public ResultCode IsVibrationDeviceMounted(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt32(); // VibrationDeviceHandle
|
||||
_ = context.RequestData.ReadInt64(); // appletResourceUserId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
int vibrationDeviceHandle = context.RequestData.ReadInt32();
|
||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service use vibrationDeviceHandle to get the PlayerIndex.
|
||||
// And return false if (npadIdType >= (NpadIdType)8 && npadIdType != NpadIdType.Handheld && npadIdType != NpadIdType.Unknown)
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct BusHandle
|
||||
{
|
||||
public int AbstractedPadId;
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
using Ryujinx.Common.Memory;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct RingLifo<T> where T : unmanaged, ISampledDataStruct
|
||||
{
|
||||
private const ulong MaxEntries = 17;
|
||||
|
||||
#pragma warning disable IDE0051, CS0169 // Remove unused private member
|
||||
private readonly ulong _unused;
|
||||
#pragma warning restore IDE0051, CS0169
|
||||
#pragma warning disable CS0414, IDE0052 // Remove unread private member
|
||||
private ulong _bufferCount;
|
||||
#pragma warning restore CS0414, IDE0052
|
||||
private ulong _index;
|
||||
private ulong _count;
|
||||
private Array17<AtomicStorage<T>> _storage;
|
||||
|
|
|
@ -6,10 +6,10 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad
|
|||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct NpadGcTriggerState : ISampledDataStruct
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public ulong SamplingNumber;
|
||||
public uint TriggerL;
|
||||
public uint TriggerR;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad
|
|||
public RingLifo<SixAxisSensorState> JoyLeftSixAxisSensor;
|
||||
public RingLifo<SixAxisSensorState> JoyRightSixAxisSensor;
|
||||
public DeviceType DeviceType;
|
||||
|
||||
#pragma warning disable IDE0051 // Remove unused private member
|
||||
private readonly uint _reserved1;
|
||||
|
||||
#pragma warning restore IDE0051
|
||||
public NpadSystemProperties SystemProperties;
|
||||
public NpadSystemButtonProperties SystemButtonProperties;
|
||||
public NpadBatteryLevel BatteryLevelJoyDual;
|
||||
|
@ -33,9 +33,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad
|
|||
public NpadBatteryLevel BatteryLevelJoyRight;
|
||||
public uint AppletFooterUiAttributes;
|
||||
public AppletFooterUiType AppletFooterUiType;
|
||||
|
||||
#pragma warning disable IDE0051 // Remove unused private member
|
||||
private readonly Reserved2Struct _reserved2;
|
||||
|
||||
#pragma warning restore IDE0051
|
||||
public RingLifo<NpadGcTriggerState> GcTrigger;
|
||||
public NpadLarkType LarkTypeLeftAndMain;
|
||||
public NpadLarkType LarkTypeRight;
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct TouchState
|
||||
{
|
||||
public ulong DeltaTime;
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public TouchAttribute Attribute;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
public uint FingerId;
|
||||
public uint X;
|
||||
public uint Y;
|
||||
public uint DiameterX;
|
||||
public uint DiameterY;
|
||||
public uint RotationAngle;
|
||||
|
||||
#pragma warning disable CS0169, IDE0051 // Remove unused private member
|
||||
private readonly uint _reserved;
|
||||
|
||||
#pragma warning restore CS0169, IDE0051
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,8 +129,9 @@ namespace Ryujinx.HLE.HOS.Services
|
|||
}
|
||||
}
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // sfci magic
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long sfciMagic = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
int commandId = (int)context.RequestData.ReadInt64();
|
||||
|
||||
bool serviceExists = service.CmifCommands.TryGetValue(commandId, out MethodInfo processRequest);
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm.Proxy
|
|||
|
||||
protected override void OnReceived(byte[] buffer, long offset, long size)
|
||||
{
|
||||
_protocol.Read(ref _buffer, ref _bufferEnd, buffer, (int)offset, (int)size, Socket.RemoteEndPoint);
|
||||
_protocol.Read(ref _buffer, ref _bufferEnd, buffer, (int)offset, (int)size, this.Socket.RemoteEndPoint);
|
||||
}
|
||||
|
||||
protected override void OnError(SocketError error)
|
||||
|
@ -66,7 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm.Proxy
|
|||
{
|
||||
try
|
||||
{
|
||||
if (endPoint.Equals(Socket.RemoteEndPoint))
|
||||
if (endPoint.Equals(this.Socket.RemoteEndPoint))
|
||||
{
|
||||
NodeInfo = info;
|
||||
_protocol.InvokeAccept(this);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Loader
|
||||
{
|
||||
enum ResultCode
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
|
|||
|
||||
coreData.SetDefault();
|
||||
|
||||
#pragma warning disable IDE0055 // Disable formatting
|
||||
#pragma warning disable IDE0055 // Disable formatting
|
||||
coreData.Nickname = template.Nickname;
|
||||
coreData.FontRegion = (FontRegion)template.FontRegion;
|
||||
coreData.FavoriteColor = (byte)template.FavoriteColor;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using LibHac.Ncm;
|
||||
using LibHac.Tools.FsSystem.NcaUtils;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using System;
|
||||
using System.Text;
|
||||
using static Ryujinx.HLE.Utilities.StringUtils;
|
||||
|
||||
|
@ -229,16 +228,12 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
|
|||
if (!string.IsNullOrWhiteSpace(contentPath))
|
||||
{
|
||||
ulong position = context.Request.RecvListBuff[0].Position;
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong size = context.Request.RecvListBuff[0].Size;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
byte[] contentPathBuffer = Encoding.UTF8.GetBytes(contentPath);
|
||||
|
||||
if ((ulong)contentPathBuffer.Length > size)
|
||||
{
|
||||
throw new InvalidOperationException("Content path buffer size is too small.");
|
||||
}
|
||||
|
||||
context.Memory.Write(position, contentPathBuffer);
|
||||
}
|
||||
else
|
||||
|
@ -252,8 +247,9 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
|
|||
private void DeleteContentPath(ServiceCtx context, ulong titleId, NcaContentType contentType)
|
||||
{
|
||||
ContentManager contentManager = context.Device.System.ContentManager;
|
||||
|
||||
//string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Manual);
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Manual);
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
contentManager.ClearEntry(titleId, NcaContentType.Manual, _storageId);
|
||||
}
|
||||
|
|
|
@ -339,6 +339,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
|
||||
public static bool HasAmiiboKeyFile => File.Exists(GetKeyRetailBinPath());
|
||||
|
||||
|
||||
public static DateTime DateTimeFromTag(ushort dateTimeTag)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
if (dumpData.Length < 540)
|
||||
throw new ArgumentException("Incomplete dump. Amiibo data is at least 540 bytes.");
|
||||
|
||||
data = new byte[540];
|
||||
Array.Copy(dumpData, data, dumpData.Length);
|
||||
dataMasterKey = dataKey;
|
||||
tagMasterKey = tagKey;
|
||||
this.data = new byte[540];
|
||||
Array.Copy(dumpData, this.data, dumpData.Length);
|
||||
this.dataMasterKey = dataKey;
|
||||
this.tagMasterKey = tagKey;
|
||||
this.isLocked = isLocked;
|
||||
|
||||
if (!isLocked)
|
||||
|
@ -44,7 +44,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
// Append data based on magic size
|
||||
int append = 16 - key.MagicSize;
|
||||
byte[] extract = new byte[16];
|
||||
Array.Copy(data, 0x011, extract, 0, 2); // Extract two bytes from user data section
|
||||
Array.Copy(this.data, 0x011, extract, 0, 2); // Extract two bytes from user data section
|
||||
for (int i = 2; i < 16; i++)
|
||||
{
|
||||
extract[i] = 0x00;
|
||||
|
@ -57,13 +57,13 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
|
||||
// Extract the UID (UID is 8 bytes)
|
||||
byte[] uid = new byte[8];
|
||||
Array.Copy(data, 0x000, uid, 0, 8);
|
||||
Array.Copy(this.data, 0x000, uid, 0, 8);
|
||||
seed.AddRange(uid);
|
||||
seed.AddRange(uid);
|
||||
|
||||
// Extract some tag data (pages 0x20 - 0x28)
|
||||
byte[] user = new byte[32];
|
||||
Array.Copy(data, 0x060, user, 0, 32);
|
||||
Array.Copy(this.data, 0x060, user, 0, 32);
|
||||
|
||||
// XOR it with the key padding (XorPad)
|
||||
byte[] paddedUser = new byte[32];
|
||||
|
@ -137,10 +137,10 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
private void DeriveKeysAndCipher()
|
||||
{
|
||||
// Derive HMAC Tag Key
|
||||
hmacTagKey = DeriveKey(tagMasterKey, false, out _, out _);
|
||||
this.hmacTagKey = DeriveKey(this.tagMasterKey, false, out _, out _);
|
||||
|
||||
// Derive HMAC Data Key and AES Key/IV
|
||||
hmacDataKey = DeriveKey(dataMasterKey, true, out aesKey, out aesIv);
|
||||
this.hmacDataKey = DeriveKey(this.dataMasterKey, true, out aesKey, out aesIv);
|
||||
}
|
||||
|
||||
private void DecryptData()
|
||||
|
|
|
@ -18,10 +18,10 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
{
|
||||
class INfp : IpcService
|
||||
{
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private ulong _appletResourceUserId;
|
||||
private ulong _mcuVersionData;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private byte[] _mcuData;
|
||||
|
||||
private State _state = State.NonInitialized;
|
||||
|
@ -482,8 +482,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
// Flush(bytes<8, 4>)
|
||||
public ResultCode Flush(ServiceCtx context)
|
||||
{
|
||||
_ = (uint)context.RequestData.ReadUInt64(); // Device handle
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
uint deviceHandle = (uint)context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
if (context.Device.System.NfpDevices.Count == 0)
|
||||
{
|
||||
return ResultCode.DeviceNotFound;
|
||||
|
|
|
@ -155,6 +155,9 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
|||
public ResultCode IsAnyInternetRequestAccepted(ServiceCtx context)
|
||||
{
|
||||
ulong position = context.Request.PtrBuff[0].Position;
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong size = context.Request.PtrBuff[0].Size;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
int clientId = context.Memory.Read<int>(position);
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
|||
private int _event0Handle;
|
||||
private int _event1Handle;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly uint _version;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public IRequest(Horizon system, uint version)
|
||||
{
|
||||
|
@ -116,7 +118,9 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
|||
// GetAppletInfo(u32) -> (u32, u32, u32, buffer<bytes, 6>)
|
||||
public ResultCode GetAppletInfo(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadUInt32(); // Theme color
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
uint themeColor = context.RequestData.ReadUInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNifm);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct InternetConnectionStatus
|
||||
{
|
||||
public InternetConnectionType Type;
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct IpV4Address
|
||||
{
|
||||
public uint Address;
|
||||
|
|
|
@ -44,6 +44,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// CountAddOnContent(pid) -> u32
|
||||
public ResultCode CountAddOnContent(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
return CountAddOnContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
|
||||
|
@ -53,6 +57,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// ListAddOnContent(u32 start_index, u32 buffer_size, pid) -> (u32 count, buffer<u32>)
|
||||
public ResultCode ListAddOnContent(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
return ListAddContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
|
||||
|
@ -71,6 +79,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// GetAddOnContentBaseId(pid) -> u64
|
||||
public ResultCode GetAddOnContentBaseId(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
return GetAddOnContentBaseIdImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
|
||||
|
@ -89,6 +101,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// PrepareAddOnContent(u32 index, pid)
|
||||
public ResultCode PrepareAddOnContent(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
return PrepareAddOnContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
|
||||
|
@ -115,6 +131,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// GetAddOnContentListChangedEventWithProcessId(pid) -> handle<copy>
|
||||
public ResultCode GetAddOnContentListChangedEventWithProcessId(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
// TODO: Found where stored value is used.
|
||||
|
@ -132,6 +152,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// NotifyMountAddOnContent(pid, u64 title_id)
|
||||
public ResultCode NotifyMountAddOnContent(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
ulong aocTitleId = context.RequestData.ReadUInt64();
|
||||
|
@ -148,6 +172,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// NotifyUnmountAddOnContent(pid, u64 title_id)
|
||||
public ResultCode NotifyUnmountAddOnContent(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
|
||||
ulong aocTitleId = context.RequestData.ReadUInt64();
|
||||
|
@ -161,6 +189,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
|
|||
// CheckAddOnContentMountStatus(pid)
|
||||
public ResultCode CheckAddOnContentMountStatus(ServiceCtx context)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
ulong pid = context.Request.HandleDesc.PId;
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
|
||||
// Then it does some internal checks and returns InvalidBufferSize if they fail.
|
||||
|
||||
|
|
|
@ -12,9 +12,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
|
||||
public ResultCode GetApplicationControlData(ServiceCtx context)
|
||||
{
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // source
|
||||
_ = context.RequestData.ReadUInt64(); // titleId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
byte source = (byte)context.RequestData.ReadInt64();
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
ulong position = context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
|
|
|
@ -11,9 +11,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
|
||||
public ResultCode GetApplicationControlData(ServiceCtx context)
|
||||
{
|
||||
|
||||
_ = context.RequestData.ReadInt64(); // source
|
||||
_ = context.RequestData.ReadUInt64(); // titleId
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
byte source = (byte)context.RequestData.ReadInt64();
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
ulong position = context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
|
|
|
@ -93,8 +93,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||
private NvResult GetIoctlArgument(ServiceCtx context, NvIoctl ioctlCommand, out Span<byte> arguments)
|
||||
{
|
||||
(ulong inputDataPosition, ulong inputDataSize) = context.Request.GetBufferType0x21(0);
|
||||
|
||||
(_, ulong outputDataSize) = context.Request.GetBufferType0x22(0);
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
(ulong outputDataPosition, ulong outputDataSize) = context.Request.GetBufferType0x22(0);
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
NvIoctl.Direction ioctlDirection = ioctlCommand.DirectionValue;
|
||||
uint ioctlSize = ioctlCommand.Size;
|
||||
|
@ -306,8 +307,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||
// Initialize(u32 transfer_memory_size, handle<copy, process> current_process, handle<copy, transfer_memory> transfer_memory) -> u32 error_code
|
||||
public ResultCode Initialize(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // transfer memory size
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long transferMemSize = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
int transferMemHandle = context.Request.HandleDesc.ToCopy[1];
|
||||
|
||||
// TODO: When transfer memory will be implemented, this could be removed.
|
||||
|
@ -429,7 +431,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||
// SetClientPID(u64, pid) -> u32 error_code
|
||||
public ResultCode SetClientPid(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // pid
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long pid = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
context.ResponseData.Write(0);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct AllocSpaceArguments
|
||||
{
|
||||
public uint Pages;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct BindChannelArguments
|
||||
{
|
||||
public int Fd;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct FreeSpaceArguments
|
||||
{
|
||||
public ulong Offset;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct VaRegion
|
||||
{
|
||||
public ulong Offset;
|
||||
|
@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
|||
public ulong Pages;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetVaRegionsArguments
|
||||
{
|
||||
public ulong Unused;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct InitializeExArguments
|
||||
{
|
||||
public uint Flags;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct MapBufferExArguments
|
||||
{
|
||||
public AddressSpaceFlags Flags;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct RemapArguments
|
||||
{
|
||||
public ushort Flags;
|
||||
|
|
|
@ -2,8 +2,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
|
|||
{
|
||||
struct UnmapBufferArguments
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public ulong Offset;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,9 +19,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
|||
|
||||
private const uint MaxModuleSyncpoint = 16;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private uint _timeout;
|
||||
private uint _submitTimeout;
|
||||
private uint _timeslice;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
private readonly Switch _device;
|
||||
|
||||
|
@ -145,10 +147,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
|||
{
|
||||
SubmitArguments submitHeader = GetSpanAndSkip<SubmitArguments>(ref arguments, 1)[0];
|
||||
Span<CommandBuffer> commandBuffers = GetSpanAndSkip<CommandBuffer>(ref arguments, submitHeader.CmdBufsCount);
|
||||
|
||||
_ = GetSpanAndSkip<Reloc>(ref arguments, submitHeader.RelocsCount); // relocs
|
||||
_ = GetSpanAndSkip<uint>(ref arguments, submitHeader.RelocsCount); // reloc shifts
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
Span<Reloc> relocs = GetSpanAndSkip<Reloc>(ref arguments, submitHeader.RelocsCount);
|
||||
Span<uint> relocShifts = GetSpanAndSkip<uint>(ref arguments, submitHeader.RelocsCount);
|
||||
#pragma warning restore IDE0059
|
||||
Span<SyncptIncr> syncptIncrs = GetSpanAndSkip<SyncptIncr>(ref arguments, submitHeader.SyncptIncrsCount);
|
||||
Span<uint> fenceThresholds = GetSpanAndSkip<uint>(ref arguments, submitHeader.FencesCount);
|
||||
|
||||
|
|
|
@ -8,10 +8,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
|||
{
|
||||
internal class NvHostGpuDeviceFile : NvHostChannelDeviceFile
|
||||
{
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly KEvent _smExceptionBptIntReportEvent;
|
||||
private readonly KEvent _smExceptionBptPauseReportEvent;
|
||||
private readonly KEvent _errorNotifierEvent;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
private int _smExceptionBptIntReportEventHandle;
|
||||
private int _smExceptionBptPauseReportEventHandle;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct AllocGpfifoExArguments
|
||||
{
|
||||
public uint NumEntries;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct AllocObjCtxArguments
|
||||
{
|
||||
public uint ClassNumber;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetParameterArguments
|
||||
{
|
||||
public uint Parameter;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct CommandBufferHandle
|
||||
{
|
||||
public int MapHandle;
|
||||
|
|
|
@ -2,10 +2,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
|||
{
|
||||
class NvChannel
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public int Timeout;
|
||||
public int SubmitTimeout;
|
||||
public int Timeslice;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SetErrorNotifierArguments
|
||||
{
|
||||
public ulong Offset;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct CommandBuffer
|
||||
{
|
||||
public int Mem;
|
||||
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
|||
public int WordsCount;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct Reloc
|
||||
{
|
||||
public int CmdbufMem;
|
||||
|
@ -19,7 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
|||
public int TargetOffset;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SyncptIncr
|
||||
{
|
||||
public uint Id;
|
||||
|
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
|||
public uint Reserved3;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SubmitArguments
|
||||
{
|
||||
public int CmdBufsCount;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SubmitGpfifoArguments
|
||||
{
|
||||
public long Address;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct ZcullBindArguments
|
||||
{
|
||||
public ulong GpuVirtualAddress;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct EventWaitArguments
|
||||
{
|
||||
public NvFence Fence;
|
||||
|
|
|
@ -18,9 +18,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
|||
public int EventHandle;
|
||||
|
||||
private readonly uint _eventId;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly NvHostSyncpt _syncpointManager;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private SyncpointWaiterHandle _waiterInformation;
|
||||
|
||||
private NvFence _previousFailingFence;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SyncptWaitArguments
|
||||
{
|
||||
public NvFence Fence;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct SyncptWaitExArguments
|
||||
{
|
||||
public SyncptWaitArguments Input;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetActiveSlotMaskArguments
|
||||
{
|
||||
public int Slot;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GpuCharacteristics
|
||||
{
|
||||
public int Arch;
|
||||
|
@ -44,13 +44,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
|||
|
||||
struct CharacteristicsHeader
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public long BufferSize;
|
||||
public long BufferAddress;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetCharacteristicsArguments
|
||||
{
|
||||
public CharacteristicsHeader Header;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetGpuTimeArguments
|
||||
{
|
||||
public ulong Timestamp;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct GetTpcMasksArguments
|
||||
{
|
||||
public int MaskBufferSize;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NumVsmsArguments
|
||||
{
|
||||
public uint NumVsms;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct VsmsMappingArguments
|
||||
{
|
||||
public byte Sm0GpcIndex;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct ZbcSetTableArguments
|
||||
{
|
||||
public Array4<uint> ColorDs;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct ZcullGetCtxSizeArguments
|
||||
{
|
||||
public int Size;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct ZcullGetInfoArguments
|
||||
{
|
||||
public int WidthAlignPixels;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapAlloc
|
||||
{
|
||||
public int Handle;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapCreate
|
||||
{
|
||||
public uint Size;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapFree
|
||||
{
|
||||
public int Handle;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapFromId
|
||||
{
|
||||
public int Id;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapGetId
|
||||
{
|
||||
public int Id;
|
||||
|
|
|
@ -4,10 +4,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
|||
{
|
||||
class NvMapHandle
|
||||
{
|
||||
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
public int Handle;
|
||||
public int Id;
|
||||
|
||||
#pragma warning restore CS0649
|
||||
public uint Size;
|
||||
public int Align;
|
||||
public int Kind;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvMapParam
|
||||
{
|
||||
public int Handle;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NvIoctl
|
||||
{
|
||||
public const int NvHostCustomMagic = 0x00;
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
|
|||
private readonly int _permissionFlag;
|
||||
private ulong _titleId;
|
||||
private ParentalControlFlagValue _parentalControlFlag;
|
||||
#pragma warning disable IDE0052, CS0414 // Remove unread private member
|
||||
private int[] _ratingAge;
|
||||
|
||||
// TODO: Find where they are set.
|
||||
|
@ -19,6 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
|
|||
private bool _freeCommunicationEnabled = false;
|
||||
private readonly bool _stereoVisionRestrictionConfigurable = true;
|
||||
private bool _stereoVisionRestriction = false;
|
||||
#pragma warning restore IDE0052, CS0414
|
||||
|
||||
public IParentalControlService(ServiceCtx context, ulong pid, bool withInitialize, int permissionFlag)
|
||||
{
|
||||
|
@ -176,6 +178,7 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
|
|||
return ResultCode.PermissionDenied;
|
||||
}
|
||||
|
||||
#pragma warning disable // Remove unnecessary value assignment
|
||||
bool stereoVisionRestriction = false;
|
||||
|
||||
if (_stereoVisionRestrictionConfigurable)
|
||||
|
|
|
@ -7,9 +7,9 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst.ClkrstManager
|
|||
class IClkrstSession : IpcService
|
||||
{
|
||||
private readonly DeviceCode _deviceCode;
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly uint _unknown;
|
||||
|
||||
#pragma warning restore IDE0052
|
||||
private uint _clockRate;
|
||||
|
||||
private readonly DeviceCode[] _allowedDeviceCodeTable =
|
||||
|
|
|
@ -17,7 +17,9 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
|
|||
// RequestLoad(u32)
|
||||
public ResultCode RequestLoad(ServiceCtx context)
|
||||
{
|
||||
_ = (SharedFontType)context.RequestData.ReadInt32(); // font type
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
SharedFontType fontType = (SharedFontType)context.RequestData.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// We don't need to do anything here because we do lazy initialization
|
||||
// on SharedFontManager (the font is loaded when necessary).
|
||||
|
@ -28,7 +30,9 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
|
|||
// GetLoadState(u32) -> u32
|
||||
public ResultCode GetLoadState(ServiceCtx context)
|
||||
{
|
||||
_ = (SharedFontType)context.RequestData.ReadInt32(); // font type
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
SharedFontType fontType = (SharedFontType)context.RequestData.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// 1 (true) indicates that the font is already loaded.
|
||||
// All fonts are already loaded.
|
||||
|
@ -82,8 +86,9 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
|
|||
// GetSharedFontInOrderOfPriority(bytes<8, 1>) -> (u8, u32, buffer<unknown, 6>, buffer<unknown, 6>, buffer<unknown, 6>)
|
||||
public ResultCode GetSharedFontInOrderOfPriority(ServiceCtx context)
|
||||
{
|
||||
_ = context.RequestData.ReadInt64(); // language code
|
||||
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
long languageCode = context.RequestData.ReadInt64();
|
||||
#pragma warning restore IDE0059
|
||||
int loadedCount = 0;
|
||||
|
||||
for (SharedFontType type = 0; type < SharedFontType.Count; type++)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue