From 4738113f293ac2477a553225a24b6c489c6855f1 Mon Sep 17 00:00:00 2001 From: Cristallix Date: Mon, 20 Apr 2020 23:59:59 +0200 Subject: [PATCH] Suppress warnings from fields never used or never assigned (CS0169 and CS0649) (#919) * chore : disable unwanted warnings and minor code cleanup * chore : remove more warnings * fix : reorder struct correctly * fix : restore _isKernel and remove useless comment * fix : copy/paste error * fix : restore CallMethod call * fix : whitespace * chore : clean using * feat : remove warnings * fix : simplify warning removal on struct * fix : revert fields deletion and code clean up * fix : re-add RE value * fix : typo --- ARMeilleure/Diagnostics/Logger.cs | 2 ++ ARMeilleure/Statistics.cs | 2 ++ Ryujinx.Debugger/Profiler/Profile.cs | 2 ++ Ryujinx.Debugger/UI/DebuggerWidget.cs | 2 ++ Ryujinx.Debugger/UI/ProfilerWidget.cs | 4 +++- Ryujinx.Graphics.Gpu/DmaPusher.cs | 8 +------- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 2 ++ Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs | 2 ++ Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs | 2 ++ Ryujinx.Graphics.Gpu/Shader/ShaderAddresses.cs | 2 ++ Ryujinx.Graphics.Gpu/State/BlendState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs | 2 ++ Ryujinx.Graphics.Gpu/State/Boolean32.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ClearColors.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ConditionState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyBufferParams.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyBufferTexture.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyRegion.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyTexture.cs | 2 ++ Ryujinx.Graphics.Gpu/State/CopyTextureControl.cs | 2 ++ Ryujinx.Graphics.Gpu/State/DepthBiasState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/FaceState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/GpuVa.cs | 2 ++ Ryujinx.Graphics.Gpu/State/IndexBufferState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/Inline2MemoryParams.cs | 2 ++ Ryujinx.Graphics.Gpu/State/MemoryLayout.cs | 2 ++ Ryujinx.Graphics.Gpu/State/PoolState.cs | 2 ++ .../State/PrimitiveRestartState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ReportState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/RtColorMask.cs | 2 ++ Ryujinx.Graphics.Gpu/State/RtColorState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/RtControl.cs | 2 ++ Ryujinx.Graphics.Gpu/State/RtDepthStencilState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ScissorState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ShaderState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/Size3D.cs | 2 ++ Ryujinx.Graphics.Gpu/State/StencilBackMasks.cs | 2 ++ .../State/StencilBackTestState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/StencilTestState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/UniformBufferState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/VertexAttribState.cs | 2 ++ .../State/VertexBufferDrawState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/VertexBufferState.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ViewportExtents.cs | 2 ++ Ryujinx.Graphics.Gpu/State/ViewportTransform.cs | 2 ++ Ryujinx.HLE/HOS/Horizon.cs | 2 ++ Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs | 4 ---- Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs | 3 +++ Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs | 2 ++ .../HOS/Services/Arp/ApplicationLaunchProperty.cs | 2 ++ .../Types/UpdateDataHeader.cs | 2 ++ .../HOS/Services/Bluetooth/IBluetoothDriver.cs | 2 ++ Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs | 2 ++ .../NvHostAsGpu/NvHostAsGpuDeviceFile.cs | 4 +--- .../NvHostAsGpu/Types/UnmapBufferArguments.cs | 2 ++ .../NvHostChannel/Types/NvChannel.cs | 2 ++ .../NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs | 1 - .../Types/GetCharacteristicsArguments.cs | 2 ++ .../Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs | 2 ++ Ryujinx.HLE/Loaders/Elf/ElfSymbol32.cs | 2 ++ Ryujinx.HLE/Loaders/Elf/ElfSymbol64.cs | 2 ++ Ryujinx.HLE/Switch.cs | 2 -- Ryujinx.HLE/Utilities/FontUtils.cs | 2 +- Ryujinx/Ui/MainWindow.cs | 15 ++++++--------- 65 files changed, 127 insertions(+), 28 deletions(-) diff --git a/ARMeilleure/Diagnostics/Logger.cs b/ARMeilleure/Diagnostics/Logger.cs index 29d9c79b93..e7a0ba5c4d 100644 --- a/ARMeilleure/Diagnostics/Logger.cs +++ b/ARMeilleure/Diagnostics/Logger.cs @@ -6,9 +6,11 @@ namespace ARMeilleure.Diagnostics { static class Logger { +#pragma warning disable CS0169 private static long _startTime; private static long[] _accumulatedTime; +#pragma warning restore CS0196 static Logger() { diff --git a/ARMeilleure/Statistics.cs b/ARMeilleure/Statistics.cs index e80ee59d60..fbc647082e 100644 --- a/ARMeilleure/Statistics.cs +++ b/ARMeilleure/Statistics.cs @@ -11,8 +11,10 @@ namespace ARMeilleure { private const int ReportMaxFunctions = 100; +#pragma warning disable CS0169 [ThreadStatic] private static Stopwatch _executionTimer; +#pragma warning restore CS0169 private static ConcurrentDictionary _ticksPerFunction; diff --git a/Ryujinx.Debugger/Profiler/Profile.cs b/Ryujinx.Debugger/Profiler/Profile.cs index 862aa845d1..1be638dac2 100644 --- a/Ryujinx.Debugger/Profiler/Profile.cs +++ b/Ryujinx.Debugger/Profiler/Profile.cs @@ -11,7 +11,9 @@ namespace Ryujinx.Debugger.Profiler public static float UpdateRate => _settings.UpdateRate; public static long HistoryLength => _settings.History; +#pragma warning disable CS0649 private static InternalProfile _profileInstance; +#pragma warning restore CS0649 private static ProfilerSettings _settings; [Conditional("USE_DEBUGGING")] diff --git a/Ryujinx.Debugger/UI/DebuggerWidget.cs b/Ryujinx.Debugger/UI/DebuggerWidget.cs index b2d8458dc9..1eb45735df 100644 --- a/Ryujinx.Debugger/UI/DebuggerWidget.cs +++ b/Ryujinx.Debugger/UI/DebuggerWidget.cs @@ -9,7 +9,9 @@ namespace Ryujinx.Debugger.UI public event EventHandler DebuggerEnabled; public event EventHandler DebuggerDisabled; +#pragma warning disable CS0649 [GUI] Notebook _widgetNotebook; +#pragma warning restore CS0649 public DebuggerWidget() : this(new Builder("Ryujinx.Debugger.UI.DebuggerWidget.glade")) { } diff --git a/Ryujinx.Debugger/UI/ProfilerWidget.cs b/Ryujinx.Debugger/UI/ProfilerWidget.cs index b14c8922e7..84dff5def0 100644 --- a/Ryujinx.Debugger/UI/ProfilerWidget.cs +++ b/Ryujinx.Debugger/UI/ProfilerWidget.cs @@ -81,6 +81,7 @@ namespace Ryujinx.Debugger.UI private SkRenderer _renderer; +#pragma warning disable CS0649 [GUI] ScrolledWindow _scrollview; [GUI] CheckButton _enableCheckbutton; [GUI] Scrollbar _outputScrollbar; @@ -90,6 +91,7 @@ namespace Ryujinx.Debugger.UI [GUI] CheckButton _showInactive; [GUI] Button _stepButton; [GUI] CheckButton _pauseCheckbutton; +#pragma warning restore CS0649 public ProfilerWidget() : this(new Builder("Ryujinx.Debugger.UI.ProfilerWidget.glade")) { } @@ -287,7 +289,7 @@ namespace Ryujinx.Debugger.UI _sortedProfileData = _sortedProfileData.Where((pair => filterRegex.IsMatch(pair.Key.Search))).ToList(); } } - catch (ArgumentException argException) + catch (ArgumentException) { // Skip filtering for invalid regex } diff --git a/Ryujinx.Graphics.Gpu/DmaPusher.cs b/Ryujinx.Graphics.Gpu/DmaPusher.cs index 33108c31c9..6d53e42c37 100644 --- a/Ryujinx.Graphics.Gpu/DmaPusher.cs +++ b/Ryujinx.Graphics.Gpu/DmaPusher.cs @@ -81,9 +81,6 @@ namespace Ryujinx.Graphics.Gpu private DmaState _state; - private bool _sliEnable; - private bool _sliActive; - private bool _ibEnable; private GpuContext _context; @@ -217,10 +214,7 @@ namespace Ryujinx.Graphics.Gpu } else if (_state.MethodCount != 0) { - if (!_sliEnable || _sliActive) - { - CallMethod(word); - } + CallMethod(word); if (!_state.NonIncrementing) { diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index bbfbf7601c..39a902e891 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -790,10 +790,12 @@ namespace Ryujinx.Graphics.Gpu.Engine /// private struct SbDescriptor { +#pragma warning disable CS0649 public uint AddressLow; public uint AddressHigh; public int Size; public int Padding; +#pragma warning restore CS0649 public ulong PackAddress() { diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs index 77af1ce0fe..9f5a847bbd 100644 --- a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs +++ b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs @@ -51,6 +51,7 @@ namespace Ryujinx.Graphics.Gpu.Image private const float Frac8ToF32 = 1.0f / 256.0f; +#pragma warning disable CS0649 public uint Word0; public uint Word1; public uint Word2; @@ -59,6 +60,7 @@ namespace Ryujinx.Graphics.Gpu.Image public float BorderColorG; public float BorderColorB; public float BorderColorA; +#pragma warning restore CS0649 /// /// Unpacks the texture wrap mode along the X axis. diff --git a/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs b/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs index aebf4abf7a..313b8e2052 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.Image /// struct TextureDescriptor { +#pragma warning disable CS0649 public uint Word0; public uint Word1; public uint Word2; @@ -13,6 +14,7 @@ namespace Ryujinx.Graphics.Gpu.Image public uint Word5; public uint Word6; public uint Word7; +#pragma warning restore CS0649 /// /// Unpacks Maxwell texture format integer. diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderAddresses.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderAddresses.cs index 76ea32482d..39bf10fab6 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderAddresses.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderAddresses.cs @@ -7,12 +7,14 @@ namespace Ryujinx.Graphics.Gpu.Shader /// struct ShaderAddresses : IEquatable { +#pragma warning disable CS0649 public ulong VertexA; public ulong Vertex; public ulong TessControl; public ulong TessEvaluation; public ulong Geometry; public ulong Fragment; +#pragma warning restore CS0649 /// /// Check if the addresses are equal. diff --git a/Ryujinx.Graphics.Gpu/State/BlendState.cs b/Ryujinx.Graphics.Gpu/State/BlendState.cs index 609bcc2937..c4d5a064e8 100644 --- a/Ryujinx.Graphics.Gpu/State/BlendState.cs +++ b/Ryujinx.Graphics.Gpu/State/BlendState.cs @@ -7,6 +7,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct BlendState { +#pragma warning disable CS0649 public Boolean32 SeparateAlpha; public BlendOp ColorOp; public BlendFactor ColorSrcFactor; @@ -15,5 +16,6 @@ namespace Ryujinx.Graphics.Gpu.State public BlendFactor AlphaSrcFactor; public BlendFactor AlphaDstFactor; public uint Padding; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs b/Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs index a11cd5b10b..cbb1880b05 100644 --- a/Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs +++ b/Ryujinx.Graphics.Gpu/State/BlendStateCommon.cs @@ -7,6 +7,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct BlendStateCommon { +#pragma warning disable CS0649 public Boolean32 SeparateAlpha; public BlendOp ColorOp; public BlendFactor ColorSrcFactor; @@ -15,5 +16,6 @@ namespace Ryujinx.Graphics.Gpu.State public BlendFactor AlphaSrcFactor; public uint Unknown0x1354; public BlendFactor AlphaDstFactor; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/Boolean32.cs b/Ryujinx.Graphics.Gpu/State/Boolean32.cs index ff701d9e46..78e13b733c 100644 --- a/Ryujinx.Graphics.Gpu/State/Boolean32.cs +++ b/Ryujinx.Graphics.Gpu/State/Boolean32.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct Boolean32 { +#pragma warning disable CS0649 private uint _value; +#pragma warning restore CS0649 public static implicit operator bool(Boolean32 value) { diff --git a/Ryujinx.Graphics.Gpu/State/ClearColors.cs b/Ryujinx.Graphics.Gpu/State/ClearColors.cs index b9f7b68476..ba29c899c8 100644 --- a/Ryujinx.Graphics.Gpu/State/ClearColors.cs +++ b/Ryujinx.Graphics.Gpu/State/ClearColors.cs @@ -5,9 +5,11 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ClearColors { +#pragma warning disable CS0649 public float Red; public float Green; public float Blue; public float Alpha; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/ConditionState.cs b/Ryujinx.Graphics.Gpu/State/ConditionState.cs index bad266d9e6..3388e8f029 100644 --- a/Ryujinx.Graphics.Gpu/State/ConditionState.cs +++ b/Ryujinx.Graphics.Gpu/State/ConditionState.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ConditionState { +#pragma warning disable CS0649 public GpuVa Address; public Condition Condition; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/CopyBufferParams.cs b/Ryujinx.Graphics.Gpu/State/CopyBufferParams.cs index 7393c9692b..67c3e21485 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyBufferParams.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyBufferParams.cs @@ -5,11 +5,13 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyBufferParams { +#pragma warning disable CS0649 public GpuVa SrcAddress; public GpuVa DstAddress; public int SrcStride; public int DstStride; public int XCount; public int YCount; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs b/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs index 5b3d7076d9..b4a9d9c283 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyBufferSwizzle { +#pragma warning disable CS0649 public uint Swizzle; +#pragma warning restore CS0649 /// /// Unpacks the size of each vector component of the copy. diff --git a/Ryujinx.Graphics.Gpu/State/CopyBufferTexture.cs b/Ryujinx.Graphics.Gpu/State/CopyBufferTexture.cs index 98d113a354..dfbab37ad7 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyBufferTexture.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyBufferTexture.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyBufferTexture { +#pragma warning disable CS0649 public MemoryLayout MemoryLayout; public int Width; public int Height; @@ -12,5 +13,6 @@ namespace Ryujinx.Graphics.Gpu.State public int RegionZ; public ushort RegionX; public ushort RegionY; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/CopyRegion.cs b/Ryujinx.Graphics.Gpu/State/CopyRegion.cs index a256594b35..29889835fa 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyRegion.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyRegion.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyRegion { +#pragma warning disable CS0649 public int DstX; public int DstY; public int DstWidth; @@ -13,5 +14,6 @@ namespace Ryujinx.Graphics.Gpu.State public long SrcHeightRF; public long SrcXF; public long SrcYF; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/CopyTexture.cs b/Ryujinx.Graphics.Gpu/State/CopyTexture.cs index df723d0d12..52e3549875 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyTexture.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyTexture.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyTexture { +#pragma warning disable CS0649 public RtFormat Format; public Boolean32 LinearLayout; public MemoryLayout MemoryLayout; @@ -14,5 +15,6 @@ namespace Ryujinx.Graphics.Gpu.State public int Width; public int Height; public GpuVa Address; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/CopyTextureControl.cs b/Ryujinx.Graphics.Gpu/State/CopyTextureControl.cs index cfc64fc45d..50fb901034 100644 --- a/Ryujinx.Graphics.Gpu/State/CopyTextureControl.cs +++ b/Ryujinx.Graphics.Gpu/State/CopyTextureControl.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct CopyTextureControl { +#pragma warning disable CS0649 public uint Packed; +#pragma warning restore CS0649 public bool UnpackLinearFilter() { diff --git a/Ryujinx.Graphics.Gpu/State/DepthBiasState.cs b/Ryujinx.Graphics.Gpu/State/DepthBiasState.cs index 752706252b..0a125804e4 100644 --- a/Ryujinx.Graphics.Gpu/State/DepthBiasState.cs +++ b/Ryujinx.Graphics.Gpu/State/DepthBiasState.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct DepthBiasState { +#pragma warning disable CS0649 public Boolean32 PointEnable; public Boolean32 LineEnable; public Boolean32 FillEnable; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/FaceState.cs b/Ryujinx.Graphics.Gpu/State/FaceState.cs index 10dec3b91f..e817b3ae3e 100644 --- a/Ryujinx.Graphics.Gpu/State/FaceState.cs +++ b/Ryujinx.Graphics.Gpu/State/FaceState.cs @@ -7,8 +7,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct FaceState { +#pragma warning disable CS0649 public Boolean32 CullEnable; public FrontFace FrontFace; public Face CullFace; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/GpuVa.cs b/Ryujinx.Graphics.Gpu/State/GpuVa.cs index 76a2fddfd2..d6b7def30f 100644 --- a/Ryujinx.Graphics.Gpu/State/GpuVa.cs +++ b/Ryujinx.Graphics.Gpu/State/GpuVa.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct GpuVa { +#pragma warning disable CS0649 public uint High; public uint Low; +#pragma warning restore CS0649 /// /// Packs the split address into a 64-bits address value. diff --git a/Ryujinx.Graphics.Gpu/State/IndexBufferState.cs b/Ryujinx.Graphics.Gpu/State/IndexBufferState.cs index b7868bb9fe..8ae38bb8e8 100644 --- a/Ryujinx.Graphics.Gpu/State/IndexBufferState.cs +++ b/Ryujinx.Graphics.Gpu/State/IndexBufferState.cs @@ -8,10 +8,12 @@ namespace Ryujinx.Graphics.Gpu.State /// struct IndexBufferState { +#pragma warning disable CS0649 public GpuVa Address; public GpuVa EndAddress; public IndexType Type; public int First; public int Count; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/Inline2MemoryParams.cs b/Ryujinx.Graphics.Gpu/State/Inline2MemoryParams.cs index 45555be20b..f4009592ab 100644 --- a/Ryujinx.Graphics.Gpu/State/Inline2MemoryParams.cs +++ b/Ryujinx.Graphics.Gpu/State/Inline2MemoryParams.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct Inline2MemoryParams { +#pragma warning disable CS0649 public int LineLengthIn; public int LineCount; public GpuVa DstAddress; @@ -16,5 +17,6 @@ namespace Ryujinx.Graphics.Gpu.State public int DstZ; public int DstX; public int DstY; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/MemoryLayout.cs b/Ryujinx.Graphics.Gpu/State/MemoryLayout.cs index 9b72b097c9..c98831f9df 100644 --- a/Ryujinx.Graphics.Gpu/State/MemoryLayout.cs +++ b/Ryujinx.Graphics.Gpu/State/MemoryLayout.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct MemoryLayout { +#pragma warning disable CS0649 public uint Packed; +#pragma warning restore CS0649 public int UnpackGobBlocksInX() { diff --git a/Ryujinx.Graphics.Gpu/State/PoolState.cs b/Ryujinx.Graphics.Gpu/State/PoolState.cs index eeb5691867..ba4dfb78bd 100644 --- a/Ryujinx.Graphics.Gpu/State/PoolState.cs +++ b/Ryujinx.Graphics.Gpu/State/PoolState.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct PoolState { +#pragma warning disable CS0649 public GpuVa Address; public int MaximumId; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/PrimitiveRestartState.cs b/Ryujinx.Graphics.Gpu/State/PrimitiveRestartState.cs index 96795083ee..d046b5222a 100644 --- a/Ryujinx.Graphics.Gpu/State/PrimitiveRestartState.cs +++ b/Ryujinx.Graphics.Gpu/State/PrimitiveRestartState.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct PrimitiveRestartState { +#pragma warning disable CS0649 public Boolean32 Enable; public int Index; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/ReportState.cs b/Ryujinx.Graphics.Gpu/State/ReportState.cs index 7430ea3161..0c14bfe953 100644 --- a/Ryujinx.Graphics.Gpu/State/ReportState.cs +++ b/Ryujinx.Graphics.Gpu/State/ReportState.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ReportState { +#pragma warning disable CS0649 public GpuVa Address; public int Payload; public uint Control; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/RtColorMask.cs b/Ryujinx.Graphics.Gpu/State/RtColorMask.cs index 4aa5c33132..3567bf3772 100644 --- a/Ryujinx.Graphics.Gpu/State/RtColorMask.cs +++ b/Ryujinx.Graphics.Gpu/State/RtColorMask.cs @@ -6,7 +6,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct RtColorMask { +#pragma warning disable CS0649 public uint Packed; +#pragma warning restore CS0649 /// /// Unpacks red channel enable. diff --git a/Ryujinx.Graphics.Gpu/State/RtColorState.cs b/Ryujinx.Graphics.Gpu/State/RtColorState.cs index 9261526a25..82ccaf74fc 100644 --- a/Ryujinx.Graphics.Gpu/State/RtColorState.cs +++ b/Ryujinx.Graphics.Gpu/State/RtColorState.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct RtColorState { +#pragma warning disable CS0649 public GpuVa Address; public int WidthOrStride; public int Height; @@ -20,5 +21,6 @@ namespace Ryujinx.Graphics.Gpu.State public int Padding3; public int Padding4; public int Padding5; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/RtControl.cs b/Ryujinx.Graphics.Gpu/State/RtControl.cs index 2e28660bf6..8b6b186706 100644 --- a/Ryujinx.Graphics.Gpu/State/RtControl.cs +++ b/Ryujinx.Graphics.Gpu/State/RtControl.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct RtControl { +#pragma warning disable CS0649 public uint Packed; +#pragma warning restore CS0649 /// /// Unpacks the number of active draw buffers. diff --git a/Ryujinx.Graphics.Gpu/State/RtDepthStencilState.cs b/Ryujinx.Graphics.Gpu/State/RtDepthStencilState.cs index abc28fca14..ceab1c2f8b 100644 --- a/Ryujinx.Graphics.Gpu/State/RtDepthStencilState.cs +++ b/Ryujinx.Graphics.Gpu/State/RtDepthStencilState.cs @@ -5,9 +5,11 @@ namespace Ryujinx.Graphics.Gpu.State /// struct RtDepthStencilState { +#pragma warning disable CS0649 public GpuVa Address; public RtFormat Format; public MemoryLayout MemoryLayout; public int LayerSize; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/ScissorState.cs b/Ryujinx.Graphics.Gpu/State/ScissorState.cs index 0676664070..4f4b02dcb5 100644 --- a/Ryujinx.Graphics.Gpu/State/ScissorState.cs +++ b/Ryujinx.Graphics.Gpu/State/ScissorState.cs @@ -2,11 +2,13 @@ { struct ScissorState { +#pragma warning disable CS0649 public Boolean32 Enable; public ushort X1; public ushort X2; public ushort Y1; public ushort Y2; public uint Padding; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/ShaderState.cs b/Ryujinx.Graphics.Gpu/State/ShaderState.cs index 62c7ed4dab..4cf67c7469 100644 --- a/Ryujinx.Graphics.Gpu/State/ShaderState.cs +++ b/Ryujinx.Graphics.Gpu/State/ShaderState.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ShaderState { +#pragma warning disable CS0649 public uint Control; public uint Offset; public uint Unknown0x8; @@ -21,6 +22,7 @@ namespace Ryujinx.Graphics.Gpu.State public uint Unknown0x34; public uint Unknown0x38; public uint Unknown0x3c; +#pragma warning restore CS0649 /// /// Unpacks shader enable information. diff --git a/Ryujinx.Graphics.Gpu/State/Size3D.cs b/Ryujinx.Graphics.Gpu/State/Size3D.cs index 0fa3314a3d..1c127da6ac 100644 --- a/Ryujinx.Graphics.Gpu/State/Size3D.cs +++ b/Ryujinx.Graphics.Gpu/State/Size3D.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct Size3D { +#pragma warning disable CS0649 public int Width; public int Height; public int Depth; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/StencilBackMasks.cs b/Ryujinx.Graphics.Gpu/State/StencilBackMasks.cs index f9ee613f4c..49061cc5e9 100644 --- a/Ryujinx.Graphics.Gpu/State/StencilBackMasks.cs +++ b/Ryujinx.Graphics.Gpu/State/StencilBackMasks.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct StencilBackMasks { +#pragma warning disable CS0649 public int FuncRef; public int Mask; public int FuncMask; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/StencilBackTestState.cs b/Ryujinx.Graphics.Gpu/State/StencilBackTestState.cs index 0169b5e777..1665532262 100644 --- a/Ryujinx.Graphics.Gpu/State/StencilBackTestState.cs +++ b/Ryujinx.Graphics.Gpu/State/StencilBackTestState.cs @@ -7,10 +7,12 @@ namespace Ryujinx.Graphics.Gpu.State /// struct StencilBackTestState { +#pragma warning disable CS0649 public Boolean32 TwoSided; public StencilOp BackSFail; public StencilOp BackDpFail; public StencilOp BackDpPass; public CompareOp BackFunc; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/StencilTestState.cs b/Ryujinx.Graphics.Gpu/State/StencilTestState.cs index a50de6e6c6..72f85f2bb3 100644 --- a/Ryujinx.Graphics.Gpu/State/StencilTestState.cs +++ b/Ryujinx.Graphics.Gpu/State/StencilTestState.cs @@ -7,6 +7,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct StencilTestState { +#pragma warning disable CS0649 public Boolean32 Enable; public StencilOp FrontSFail; public StencilOp FrontDpFail; @@ -15,5 +16,6 @@ namespace Ryujinx.Graphics.Gpu.State public int FrontFuncRef; public int FrontFuncMask; public int FrontMask; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/UniformBufferState.cs b/Ryujinx.Graphics.Gpu/State/UniformBufferState.cs index 15fe556e9d..d547ea82c2 100644 --- a/Ryujinx.Graphics.Gpu/State/UniformBufferState.cs +++ b/Ryujinx.Graphics.Gpu/State/UniformBufferState.cs @@ -5,8 +5,10 @@ namespace Ryujinx.Graphics.Gpu.State /// struct UniformBufferState { +#pragma warning disable CS0649 public int Size; public GpuVa Address; public int Offset; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs b/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs index c22b1ca93a..dbb75a5b1e 100644 --- a/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs +++ b/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct VertexAttribState { +#pragma warning disable CS0649 public uint Attribute; +#pragma warning restore CS0649 /// /// Unpacks the index of the vertex buffer this attribute belongs to. diff --git a/Ryujinx.Graphics.Gpu/State/VertexBufferDrawState.cs b/Ryujinx.Graphics.Gpu/State/VertexBufferDrawState.cs index b1c9a087aa..3e11838a67 100644 --- a/Ryujinx.Graphics.Gpu/State/VertexBufferDrawState.cs +++ b/Ryujinx.Graphics.Gpu/State/VertexBufferDrawState.cs @@ -5,7 +5,9 @@ namespace Ryujinx.Graphics.Gpu.State /// struct VertexBufferDrawState { +#pragma warning disable CS0649 public int First; public int Count; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/VertexBufferState.cs b/Ryujinx.Graphics.Gpu/State/VertexBufferState.cs index e514f2a90a..85176d8219 100644 --- a/Ryujinx.Graphics.Gpu/State/VertexBufferState.cs +++ b/Ryujinx.Graphics.Gpu/State/VertexBufferState.cs @@ -5,9 +5,11 @@ namespace Ryujinx.Graphics.Gpu.State /// struct VertexBufferState { +#pragma warning disable CS0649 public uint Control; public GpuVa Address; public int Divisor; +#pragma warning restore CS0649 /// /// Vertex buffer stride, defined as the number of bytes occupied by each vertex in memory. diff --git a/Ryujinx.Graphics.Gpu/State/ViewportExtents.cs b/Ryujinx.Graphics.Gpu/State/ViewportExtents.cs index 6675c909b9..d7728f41b6 100644 --- a/Ryujinx.Graphics.Gpu/State/ViewportExtents.cs +++ b/Ryujinx.Graphics.Gpu/State/ViewportExtents.cs @@ -5,11 +5,13 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ViewportExtents { +#pragma warning disable CS0649 public ushort X; public ushort Width; public ushort Y; public ushort Height; public float DepthNear; public float DepthFar; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Gpu/State/ViewportTransform.cs b/Ryujinx.Graphics.Gpu/State/ViewportTransform.cs index c7db311de9..b795ea1587 100644 --- a/Ryujinx.Graphics.Gpu/State/ViewportTransform.cs +++ b/Ryujinx.Graphics.Gpu/State/ViewportTransform.cs @@ -7,6 +7,7 @@ namespace Ryujinx.Graphics.Gpu.State /// struct ViewportTransform { +#pragma warning disable CS0649 public float ScaleX; public float ScaleY; public float ScaleZ; @@ -15,6 +16,7 @@ namespace Ryujinx.Graphics.Gpu.State public float TranslateZ; public uint Swizzle; public uint SubpixelPrecisionBias; +#pragma warning restore CS0649 /// /// Unpacks viewport swizzle of the position X component. diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index fb961a2d44..7f7fd4c6b7 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -114,7 +114,9 @@ namespace Ryujinx.HLE.HOS public Keyset KeySet => Device.FileSystem.KeySet; +#pragma warning disable CS0649 private bool _hasStarted; +#pragma warning restore CS0649 private bool _isDisposed; public BlitStruct ControlData { get; set; } diff --git a/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs b/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs index a12a1986fb..166de065ea 100644 --- a/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs +++ b/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs @@ -7,14 +7,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc public KLightServerSession ServerSession { get; } public KLightClientSession ClientSession { get; } - private bool _hasBeenInitialized; - public KLightSession(Horizon system) : base(system) { ServerSession = new KLightServerSession(system, this); ClientSession = new KLightClientSession(system, this); - - _hasBeenInitialized = true; } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs b/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs index fd2078ee16..3379e912bb 100644 --- a/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs +++ b/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs @@ -64,6 +64,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory public int AddrSpaceWidth { get; private set; } private bool _isKernel; + private bool _aslrEnabled; private KMemoryBlockAllocator _blockAllocator; @@ -78,6 +79,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory _cpuMemory = cpuMemory; _blocks = new LinkedList(); + + _isKernel = false; } private static readonly int[] AddrSpaceSizes = new int[] { 32, 36, 32, 39 }; diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs index cd60c95504..e629be4567 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs @@ -66,7 +66,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading private long _affinityMaskOverride; private int _preferredCoreOverride; +#pragma warning disable CS0649 private int _affinityOverrideCount; +#pragma warning restore CS0649 public ThreadSchedState SchedFlags { get; private set; } diff --git a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs index 686577d7e3..25c849848b 100644 --- a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs +++ b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs @@ -8,7 +8,9 @@ namespace Ryujinx.HLE.HOS.Services.Arp public int Version; public byte BaseGameStorageId; public byte UpdateGameStorageId; +#pragma warning disable CS0649 public short Padding; +#pragma warning restore CS0649 public static ApplicationLaunchProperty Default { diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs index f4a77f2f92..6adb874c35 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs @@ -2,6 +2,7 @@ { struct UpdateDataHeader { +#pragma warning disable CS0649 public int Revision; public int BehaviorSize; public int MemoryPoolSize; @@ -18,5 +19,6 @@ public int Unknown34; public int Unknown38; public int TotalSize; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs index fc20ec3086..8b9a8a94c5 100644 --- a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs +++ b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs @@ -9,7 +9,9 @@ namespace Ryujinx.HLE.HOS.Services.Bluetooth [Service("btdrv")] class IBluetoothDriver : IpcService { +#pragma warning disable CS0169 private string _unknownLowEnergy; +#pragma warning restore CS0169 public IBluetoothDriver(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index e34c421344..5e84eda64e 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -26,7 +26,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid private long _npadCommunicationMode; private uint _accelerometerPlayMode; +#pragma warning disable CS0649 private long _vibrationGcErmCommand; +#pragma warning restore CS0649 private float _sevenSixAxisSensorFusionStrength; private HidSensorFusionParameters _sensorFusionParams; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs index 6653c0f0eb..a19e180fb8 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs @@ -1,12 +1,10 @@ -using Ryujinx.Common; -using Ryujinx.Common.Logging; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gpu.Memory; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Concurrent; -using System.Diagnostics; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs index 1ef880afea..7f41f26a88 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs @@ -2,6 +2,8 @@ { struct UnmapBufferArguments { +#pragma warning disable CS0649 public long Offset; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs index 22cfba3d6c..8e2c6ca321 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs @@ -2,8 +2,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { class NvChannel { +#pragma warning disable CS0649 public int Timeout; public int SubmitTimeout; public int Timeslice; +#pragma warning restore CS0649 } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs index ac7092a6a0..53d4c98c6f 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs @@ -1,6 +1,5 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Kernel.Common; -using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types; using System; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs index 5b44109a1e..d664817810 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs @@ -44,8 +44,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types struct CharacteristicsHeader { +#pragma warning disable CS0649 public long BufferSize; public long BufferAddress; +#pragma warning restore CS0649 } [StructLayout(LayoutKind.Sequential)] diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs index 3903b77c02..88ec1487ca 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs @@ -4,8 +4,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { class NvMapHandle { +#pragma warning disable CS0649 public int Handle; public int Id; +#pragma warning restore CS0649 public int Size; public int Align; public int Kind; diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbol32.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbol32.cs index b7d9850636..32e8af7c46 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbol32.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbol32.cs @@ -2,11 +2,13 @@ { struct ElfSymbol32 { +#pragma warning disable CS0649 public uint NameOffset; public uint ValueAddress; public uint Size; public char Info; public char Other; public ushort SectionIndex; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbol64.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbol64.cs index 662de1ff1b..9290e0142e 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbol64.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbol64.cs @@ -2,11 +2,13 @@ { struct ElfSymbol64 { +#pragma warning disable CS0649 public uint NameOffset; public char Info; public char Other; public ushort SectionIndex; public ulong ValueAddress; public ulong Size; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index 040fbf1cf8..c9b8daa534 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -34,8 +34,6 @@ namespace Ryujinx.HLE public AutoResetEvent VsyncEvent { get; private set; } - public event EventHandler Finish; - public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, IRenderer renderer, IAalOutput audioOut) { if (renderer == null) diff --git a/Ryujinx.HLE/Utilities/FontUtils.cs b/Ryujinx.HLE/Utilities/FontUtils.cs index 3da0ef68b8..91cbdee744 100644 --- a/Ryujinx.HLE/Utilities/FontUtils.cs +++ b/Ryujinx.HLE/Utilities/FontUtils.cs @@ -8,7 +8,7 @@ namespace Ryujinx.HLE.Utilities public static byte[] DecryptFont(Stream bfttfStream) { - uint KXor(uint In) => In ^ 0x06186249; + uint KXor(uint In) => In ^ FontKey; using (BinaryReader reader = new BinaryReader(bfttfStream)) { diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 4bbfc78b82..7d1b7d42ac 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -1,5 +1,4 @@ using Gtk; -using JsonPrettyPrinterPlus; using LibHac.Common; using LibHac.Ns; using Ryujinx.Audio; @@ -12,15 +11,11 @@ using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.FileSystem.Content; using Ryujinx.HLE.HOS.Services.Hid; using System; -using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; -using System.Text; using System.Threading; using System.Threading.Tasks; -using Utf8Json; -using Utf8Json.Resolvers; using GUI = Gtk.Builder.ObjectAttribute; @@ -42,14 +37,17 @@ namespace Ryujinx.Ui private static bool _updatingGameTable; private static bool _gameLoaded; private static bool _ending; +#pragma warning disable CS0169 private static bool _debuggerOpened; +#pragma warning restore CS0169 private static TreeView _treeView; +#pragma warning disable CS0169 private static Ryujinx.Debugger.Debugger _debugger; +#pragma warning restore CS0169 -#pragma warning disable CS0649 -#pragma warning disable IDE0044 +#pragma warning disable CS0169, CS0649, IDE0044 [GUI] Window _mainWin; [GUI] MenuBar _menuBar; @@ -83,8 +81,7 @@ namespace Ryujinx.Ui [GUI] Label _vSyncStatus; [GUI] Box _listStatusBox; -#pragma warning restore CS0649 -#pragma warning restore IDE0044 +#pragma warning restore CS0649, IDE0044, CS0169 public MainWindow() : this(new Builder("Ryujinx.Ui.MainWindow.glade")) { }