Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)"

This reverts merge request !47
This commit is contained in:
GreemDev
2025-06-15 20:45:26 -05:00
parent faf9e3cdd7
commit 77a797f154
307 changed files with 1245 additions and 1016 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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",

View File

@@ -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;

View File

@@ -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;