0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2025-01-05 18:32:00 +00:00

Do not initialize unnecessarily

This commit is contained in:
Marco Carvalho 2024-12-22 10:25:11 -03:00
parent decd37ce6d
commit bfa21358af
72 changed files with 153 additions and 153 deletions

View file

@ -119,8 +119,8 @@ namespace ARMeilleure.CodeGen.Arm64
Sve2p1 = 1UL << 36, Sve2p1 = 1UL << 36,
} }
public static LinuxFeatureFlagsHwCap LinuxFeatureInfoHwCap { get; } = 0; public static LinuxFeatureFlagsHwCap LinuxFeatureInfoHwCap { get; }
public static LinuxFeatureFlagsHwCap2 LinuxFeatureInfoHwCap2 { get; } = 0; public static LinuxFeatureFlagsHwCap2 LinuxFeatureInfoHwCap2 { get; }
#endregion #endregion
@ -167,7 +167,7 @@ namespace ARMeilleure.CodeGen.Arm64
Sha256 = 1 << 8, Sha256 = 1 << 8,
} }
public static MacOsFeatureFlags MacOsFeatureInfo { get; } = 0; public static MacOsFeatureFlags MacOsFeatureInfo { get; }
#endregion #endregion

View file

@ -146,9 +146,9 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
} }
} }
private Queue<Operation> _fillQueue = null; private Queue<Operation> _fillQueue;
private Queue<Operation> _spillQueue = null; private Queue<Operation> _spillQueue;
private ParallelCopy _parallelCopy = null; private ParallelCopy _parallelCopy;
public bool HasCopy { get; private set; } public bool HasCopy { get; private set; }

View file

@ -111,9 +111,9 @@ namespace ARMeilleure.CodeGen.X86
public static FeatureFlags1Edx FeatureInfo1Edx { get; } public static FeatureFlags1Edx FeatureInfo1Edx { get; }
public static FeatureFlags1Ecx FeatureInfo1Ecx { get; } public static FeatureFlags1Ecx FeatureInfo1Ecx { get; }
public static FeatureFlags7Ebx FeatureInfo7Ebx { get; } = 0; public static FeatureFlags7Ebx FeatureInfo7Ebx { get; }
public static FeatureFlags7Ecx FeatureInfo7Ecx { get; } = 0; public static FeatureFlags7Ecx FeatureInfo7Ecx { get; }
public static Xcr0FlagsEax Xcr0InfoEax { get; } = 0; public static Xcr0FlagsEax Xcr0InfoEax { get; }
public static bool SupportsSse => FeatureInfo1Edx.HasFlag(FeatureFlags1Edx.Sse); public static bool SupportsSse => FeatureInfo1Edx.HasFlag(FeatureFlags1Edx.Sse);
public static bool SupportsSse2 => FeatureInfo1Edx.HasFlag(FeatureFlags1Edx.Sse2); public static bool SupportsSse2 => FeatureInfo1Edx.HasFlag(FeatureFlags1Edx.Sse2);

View file

@ -13,7 +13,7 @@ namespace ARMeilleure.Decoders
Cond = (Condition)((uint)opCode >> 28); Cond = (Condition)((uint)opCode >> 28);
} }
public bool IsThumb { get; protected init; } = false; public bool IsThumb { get; protected init; }
public uint GetPc() public uint GetPc()
{ {

View file

@ -6,7 +6,7 @@ namespace ARMeilleure
public static class Optimizations public static class Optimizations
{ {
// low-core count PPTC // low-core count PPTC
public static bool LowPower { get; set; } = false; public static bool LowPower { get; set; }
public static bool FastFP { get; set; } = true; public static bool FastFP { get; set; } = true;

View file

@ -24,7 +24,7 @@ namespace ARMeilleure.State
public long Tpidr2El0; public long Tpidr2El0;
} }
private static NativeCtxStorage _dummyStorage = new(); private static NativeCtxStorage _dummyStorage;
private readonly IJitMemoryBlock _block; private readonly IJitMemoryBlock _block;

View file

@ -54,7 +54,7 @@ namespace ARMeilleure.Translation
public bool HasPtc { get; } public bool HasPtc { get; }
public Aarch32Mode Mode { get; } public Aarch32Mode Mode { get; }
private int _ifThenBlockStateIndex = 0; private int _ifThenBlockStateIndex;
private Condition[] _ifThenBlockState = Array.Empty<Condition>(); private Condition[] _ifThenBlockState = Array.Empty<Condition>();
public bool IsInIfThenBlock => _ifThenBlockStateIndex < _ifThenBlockState.Length; public bool IsInIfThenBlock => _ifThenBlockStateIndex < _ifThenBlockState.Length;
public Condition CurrentIfThenBlockCond => _ifThenBlockState[_ifThenBlockStateIndex]; public Condition CurrentIfThenBlockCond => _ifThenBlockState[_ifThenBlockStateIndex];

View file

@ -14,8 +14,8 @@ namespace ARMeilleure.Translation
private const bool Black = true; private const bool Black = true;
private const bool Red = false; private const bool Red = false;
private IntervalTreeNode<TK, TV> _root = null; private IntervalTreeNode<TK, TV> _root;
private int _count = 0; private int _count;
public int Count => _count; public int Count => _count;
@ -709,9 +709,9 @@ namespace ARMeilleure.Translation
class IntervalTreeNode<TK, TV> class IntervalTreeNode<TK, TV>
{ {
public bool Color = true; public bool Color = true;
public IntervalTreeNode<TK, TV> Left = null; public IntervalTreeNode<TK, TV> Left;
public IntervalTreeNode<TK, TV> Right = null; public IntervalTreeNode<TK, TV> Right;
public IntervalTreeNode<TK, TV> Parent = null; public IntervalTreeNode<TK, TV> Parent;
/// <summary> /// <summary>
/// The start of the range. /// The start of the range.

View file

@ -34,7 +34,7 @@ namespace Ryujinx.Common.PreciseSleep
/// <summary> /// <summary>
/// Set to true to disable timepoint realignment. /// Set to true to disable timepoint realignment.
/// </summary> /// </summary>
public bool Precise { get; set; } = false; public bool Precise { get; set; }
public long AdjustTimePoint(long timePoint, long timeoutNs) public long AdjustTimePoint(long timePoint, long timeoutNs)
{ {

View file

@ -70,8 +70,8 @@ namespace Ryujinx.Common.Utilities
private BinaryReader _binaryReader; private BinaryReader _binaryReader;
private long _offsetB, _dataSizeB, _cartSizeB, _fileSizeB; private long _offsetB, _dataSizeB, _cartSizeB, _fileSizeB;
private bool _fileOK = true; private bool _fileOK = true;
private bool _freeSpaceChecked = false; private bool _freeSpaceChecked;
private bool _freeSpaceValid = false; private bool _freeSpaceValid;
public enum OperationOutcome public enum OperationOutcome
{ {

View file

@ -8,7 +8,7 @@ namespace Ryujinx.Cpu.AppleHv
{ {
private const ulong InterruptIntervalNs = 16 * 1000000; // 16 ms private const ulong InterruptIntervalNs = 16 * 1000000; // 16 ms
private static ulong _interruptTimeDeltaTicks = 0; private static ulong _interruptTimeDeltaTicks;
public readonly ulong Handle; public readonly ulong Handle;
public readonly HvVcpuExit* ExitInfo; public readonly HvVcpuExit* ExitInfo;

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Cpu.LightningJit.State
public int Running; public int Running;
} }
private static NativeCtxStorage _dummyStorage = new(); private static NativeCtxStorage _dummyStorage;
private readonly IJitMemoryBlock _block; private readonly IJitMemoryBlock _block;

View file

@ -13,7 +13,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
/// </summary> /// </summary>
class BufferMap class BufferMap
{ {
private ulong _bufferHandle = 0; private ulong _bufferHandle;
private readonly Dictionary<BufferHandle, BufferHandle> _bufferMap = new(); private readonly Dictionary<BufferHandle, BufferHandle> _bufferMap = new();
private readonly HashSet<BufferHandle> _inFlight = new(); private readonly HashSet<BufferHandle> _inFlight = new();

View file

@ -55,7 +55,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
private int _refProducerPtr; private int _refProducerPtr;
private int _refConsumerPtr; private int _refConsumerPtr;
public uint ProgramCount { get; set; } = 0; public uint ProgramCount { get; set; }
private Action _interruptAction; private Action _interruptAction;
private readonly Lock _interruptLock = new(); private readonly Lock _interruptLock = new();

View file

@ -15,10 +15,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
// State associated with direct uniform buffer updates. // State associated with direct uniform buffer updates.
// This state is used to attempt to batch together consecutive updates. // This state is used to attempt to batch together consecutive updates.
private ulong _ubBeginCpuAddress = 0; private ulong _ubBeginCpuAddress;
private ulong _ubFollowUpAddress = 0; private ulong _ubFollowUpAddress;
private ulong _ubByteCount = 0; private ulong _ubByteCount;
private int _ubIndex = 0; private int _ubIndex;
private readonly int[] _ubData = new int[UniformDataCacheSize]; private readonly int[] _ubData = new int[UniformDataCacheSize];
/// <summary> /// <summary>

View file

@ -61,7 +61,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
/// <summary> /// <summary>
/// Index buffer data streamer for inline index buffer updates, such as those used in legacy OpenGL. /// Index buffer data streamer for inline index buffer updates, such as those used in legacy OpenGL.
/// </summary> /// </summary>
public IbStreamer IbStreamer = new(); public IbStreamer IbStreamer;
/// <summary> /// <summary>
/// If the vertex shader is emulated on compute, this should be set to the compute program, otherwise it should be null. /// If the vertex shader is emulated on compute, this should be set to the compute program, otherwise it should be null.

View file

@ -66,12 +66,12 @@ namespace Ryujinx.Graphics.Gpu
/// <summary> /// <summary>
/// Enables or disables recompression of compressed textures that are not natively supported by the host. /// Enables or disables recompression of compressed textures that are not natively supported by the host.
/// </summary> /// </summary>
public static bool EnableTextureRecompression = false; public static bool EnableTextureRecompression;
/// <summary> /// <summary>
/// Enables or disables color space passthrough, if available. /// Enables or disables color space passthrough, if available.
/// </summary> /// </summary>
public static bool EnableColorSpacePassthrough = false; public static bool EnableColorSpacePassthrough;
} }
#pragma warning restore CA2211 #pragma warning restore CA2211
} }

View file

@ -60,13 +60,13 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <remarks> /// <remarks>
/// This is null until at least one modification occurs. /// This is null until at least one modification occurs.
/// </remarks> /// </remarks>
private BufferModifiedRangeList _modifiedRanges = null; private BufferModifiedRangeList _modifiedRanges;
/// <summary> /// <summary>
/// A structure that is used to flush buffer data back to a host mapped buffer for cached readback. /// A structure that is used to flush buffer data back to a host mapped buffer for cached readback.
/// Only used if the buffer data is explicitly owned by device local memory. /// Only used if the buffer data is explicitly owned by device local memory.
/// </summary> /// </summary>
private BufferPreFlush _preFlush = null; private BufferPreFlush _preFlush;
/// <summary> /// <summary>
/// Usage tracking state that determines what type of backing the buffer should use. /// Usage tracking state that determines what type of backing the buffer should use.

View file

@ -69,7 +69,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
} }
private List<PhysicalDependency> _dependencies; private List<PhysicalDependency> _dependencies;
private BufferModifiedRangeList _modifiedRanges = null; private BufferModifiedRangeList _modifiedRanges;
/// <summary> /// <summary>
/// Creates a new instance of the buffer. /// Creates a new instance of the buffer.

View file

@ -29,7 +29,7 @@ namespace Ryujinx.Graphics.OpenGL
private readonly Sync _sync; private readonly Sync _sync;
public uint ProgramCount { get; set; } = 0; public uint ProgramCount { get; set; }
public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured; public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
private readonly CounterQueue _queue; private readonly CounterQueue _queue;
private readonly BufferedQuery _counter; private readonly BufferedQuery _counter;
private bool _hostAccessReserved = false; private bool _hostAccessReserved;
private int _refCount = 1; // Starts with a reference from the counter queue. private int _refCount = 1; // Starts with a reference from the counter queue.
private readonly Lock _lock = new(); private readonly Lock _lock = new();

View file

@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.OpenGL
public nint Handle; public nint Handle;
} }
private ulong _firstHandle = 0; private ulong _firstHandle;
private static ClientWaitSyncFlags SyncFlags => HwCapabilities.RequiresSyncFlush ? ClientWaitSyncFlags.None : ClientWaitSyncFlags.SyncFlushCommandsBit; private static ClientWaitSyncFlags SyncFlags => HwCapabilities.RequiresSyncFlush ? ClientWaitSyncFlags.None : ClientWaitSyncFlags.SyncFlushCommandsBit;
private readonly List<SyncHandle> _handles = new(); private readonly List<SyncHandle> _handles = new();

View file

@ -28,7 +28,7 @@ namespace Ryujinx.Graphics.Vulkan
private bool _initialized; private bool _initialized;
public uint ProgramCount { get; set; } = 0; public uint ProgramCount { get; set; }
internal FormatCapabilities FormatCapabilities { get; private set; } internal FormatCapabilities FormatCapabilities { get; private set; }
internal HardwareCapabilities Capabilities; internal HardwareCapabilities Capabilities;

View file

@ -38,7 +38,7 @@ namespace Ryujinx.HLE.FileSystem
private readonly ConcurrentDictionary<ulong, Stream> _romFsByPid; private readonly ConcurrentDictionary<ulong, Stream> _romFsByPid;
private static bool _isInitialized = false; private static bool _isInitialized;
public static VirtualFileSystem CreateInstance() public static VirtualFileSystem CreateInstance()
{ {

View file

@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Applets
private SoftwareKeyboardState _foregroundState = SoftwareKeyboardState.Uninitialized; private SoftwareKeyboardState _foregroundState = SoftwareKeyboardState.Uninitialized;
private volatile InlineKeyboardState _backgroundState = InlineKeyboardState.Uninitialized; private volatile InlineKeyboardState _backgroundState = InlineKeyboardState.Uninitialized;
private bool _isBackground = false; private bool _isBackground;
private AppletSession _normalSession; private AppletSession _normalSession;
private AppletSession _interactiveSession; private AppletSession _interactiveSession;
@ -53,14 +53,14 @@ namespace Ryujinx.HLE.HOS.Applets
private byte[] _transferMemory; private byte[] _transferMemory;
private string _textValue = string.Empty; private string _textValue = string.Empty;
private int _cursorBegin = 0; private int _cursorBegin;
private Encoding _encoding = Encoding.Unicode; private Encoding _encoding = Encoding.Unicode;
private KeyboardResult _lastResult = KeyboardResult.NotSet; private KeyboardResult _lastResult = KeyboardResult.NotSet;
private IDynamicTextInputHandler _dynamicTextInputHandler = null; private IDynamicTextInputHandler _dynamicTextInputHandler;
private SoftwareKeyboardRenderer _keyboardRenderer = null; private SoftwareKeyboardRenderer _keyboardRenderer;
private NpadReader _npads = null; private NpadReader _npads;
private bool _canAcceptController = false; private bool _canAcceptController;
private KeyboardInputMode _inputMode = KeyboardInputMode.ControllerAndKeyboard; private KeyboardInputMode _inputMode = KeyboardInputMode.ControllerAndKeyboard;
private readonly Lock _lock = new(); private readonly Lock _lock = new();

View file

@ -24,15 +24,15 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private readonly Lock _bufferLock = new(); private readonly Lock _bufferLock = new();
private RenderingSurfaceInfo _surfaceInfo = null; private RenderingSurfaceInfo _surfaceInfo;
private SKImageInfo _imageInfo; private SKImageInfo _imageInfo;
private SKSurface _surface = null; private SKSurface _surface;
private byte[] _bufferData = null; private byte[] _bufferData;
private readonly SKBitmap _ryujinxLogo = null; private readonly SKBitmap _ryujinxLogo;
private readonly SKBitmap _padAcceptIcon = null; private readonly SKBitmap _padAcceptIcon;
private readonly SKBitmap _padCancelIcon = null; private readonly SKBitmap _padCancelIcon;
private readonly SKBitmap _keyModeIcon = null; private readonly SKBitmap _keyModeIcon;
private readonly float _textBoxOutlineWidth; private readonly float _textBoxOutlineWidth;
private readonly float _padPressedPenWidth; private readonly float _padPressedPenWidth;

View file

@ -8,15 +8,15 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
internal class SoftwareKeyboardUIState internal class SoftwareKeyboardUIState
{ {
public string InputText = string.Empty; public string InputText = string.Empty;
public int CursorBegin = 0; public int CursorBegin;
public int CursorEnd = 0; public int CursorEnd;
public bool AcceptPressed = false; public bool AcceptPressed;
public bool CancelPressed = false; public bool CancelPressed;
public bool OverwriteMode = false; public bool OverwriteMode;
public bool TypingEnabled = true; public bool TypingEnabled = true;
public bool ControllerEnabled = true; public bool ControllerEnabled = true;
public int TextBoxBlinkCounter = 0; public int TextBoxBlinkCounter;
public RenderingSurfaceInfo SurfaceInfo = null; public RenderingSurfaceInfo SurfaceInfo;
} }
} }

View file

@ -25,8 +25,8 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
} }
} }
private TRef<bool> _cancelled = null; private TRef<bool> _cancelled;
private Thread _thread = null; private Thread _thread;
private readonly Lock _lock = new(); private readonly Lock _lock = new();
public bool IsRunning public bool IsRunning

View file

@ -22,25 +22,25 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
private int _fatalSectionCount; private int _fatalSectionCount;
// TODO: Set this when the game goes in suspension (go back to home menu ect), we currently don't support that so we can keep it set to 0. // TODO: Set this when the game goes in suspension (go back to home menu ect), we currently don't support that so we can keep it set to 0.
private readonly ulong _accumulatedSuspendedTickValue = 0; private readonly ulong _accumulatedSuspendedTickValue;
// TODO: Determine where those fields are used. // TODO: Determine where those fields are used.
#pragma warning disable IDE0052 // Remove unread private member #pragma warning disable IDE0052 // Remove unread private member
private bool _screenShotPermission = false; private bool _screenShotPermission;
private bool _operationModeChangedNotification = false; private bool _operationModeChangedNotification;
private bool _performanceModeChangedNotification = false; private bool _performanceModeChangedNotification;
private bool _restartMessageEnabled = false; private bool _restartMessageEnabled;
private bool _outOfFocusSuspendingEnabled = false; private bool _outOfFocusSuspendingEnabled;
private bool _handlesRequestToDisplay = false; private bool _handlesRequestToDisplay;
#pragma warning restore IDE0052 #pragma warning restore IDE0052
private bool _autoSleepDisabled = false; private bool _autoSleepDisabled;
#pragma warning disable IDE0052 // Remove unread private member #pragma warning disable IDE0052 // Remove unread private member
private bool _albumImageTakenNotificationEnabled = false; private bool _albumImageTakenNotificationEnabled;
private bool _recordVolumeMuted = false; private bool _recordVolumeMuted;
private uint _screenShotImageOrientation = 0; private uint _screenShotImageOrientation;
#pragma warning restore IDE0052 #pragma warning restore IDE0052
private uint _idleTimeDetectionExtension = 0; private uint _idleTimeDetectionExtension;
public ISelfController(ServiceCtx context, ulong pid) public ISelfController(ServiceCtx context, ulong pid)
{ {

View file

@ -4,7 +4,7 @@ namespace Ryujinx.HLE.HOS.Services.Apm
{ {
public PerformanceState() { } public PerformanceState() { }
public bool CpuOverclockEnabled = false; public bool CpuOverclockEnabled;
public PerformanceMode PerformanceMode = PerformanceMode.Default; public PerformanceMode PerformanceMode = PerformanceMode.Default;
public CpuBoostMode CpuBoostMode = CpuBoostMode.Disabled; public CpuBoostMode CpuBoostMode = CpuBoostMode.Disabled;

View file

@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
{ {
private readonly LibHac.Fs.Fsa.IFileSystem _fs; private readonly LibHac.Fs.Fsa.IFileSystem _fs;
private readonly string _filePath; private readonly string _filePath;
private readonly UniqueRef<LibHac.Fs.Fsa.IFile> _fileReference = new(); private readonly UniqueRef<LibHac.Fs.Fsa.IFile> _fileReference;
private readonly FileInfo _fileInfo; private readonly FileInfo _fileInfo;
public LazyFile(string filePath, string prefix, LibHac.Fs.Fsa.IFileSystem fs) public LazyFile(string filePath, string prefix, LibHac.Fs.Fsa.IFileSystem fs)

View file

@ -30,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
}; };
internal NpadJoyHoldType JoyHold { get; set; } internal NpadJoyHoldType JoyHold { get; set; }
internal bool SixAxisActive = false; // TODO: link to hidserver when implemented internal bool SixAxisActive; // TODO: link to hidserver when implemented
internal ControllerType SupportedStyleSets { get; set; } internal ControllerType SupportedStyleSets { get; set; }
public Dictionary<PlayerIndex, ConcurrentQueue<(VibrationValue, VibrationValue)>> RumbleQueues = new(); public Dictionary<PlayerIndex, ConcurrentQueue<(VibrationValue, VibrationValue)>> RumbleQueues = new();

View file

@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs
[Service("irs")] [Service("irs")]
class IIrSensorServer : IpcService class IIrSensorServer : IpcService
{ {
private int _irsensorSharedMemoryHandle = 0; private int _irsensorSharedMemoryHandle;
public IIrSensorServer(ServiceCtx context) { } public IIrSensorServer(ServiceCtx context) { }

View file

@ -10,8 +10,8 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.Lp2p
{ {
private readonly KEvent _stateChangeEvent; private readonly KEvent _stateChangeEvent;
private readonly KEvent _jointEvent; private readonly KEvent _jointEvent;
private int _stateChangeEventHandle = 0; private int _stateChangeEventHandle;
private int _jointEventHandle = 0; private int _jointEventHandle;
public ISfServiceMonitor(ServiceCtx context) public ISfServiceMonitor(ServiceCtx context)
{ {

View file

@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
private readonly IUserLocalCommunicationService _parent; private readonly IUserLocalCommunicationService _parent;
public NetworkInfo NetworkInfo; public NetworkInfo NetworkInfo;
public Array8<NodeLatestUpdate> LatestUpdates = new(); public Array8<NodeLatestUpdate> LatestUpdates;
public bool Connected { get; private set; } public bool Connected { get; private set; }
public ProxyConfig Config => _parent.NetworkClient.Config; public ProxyConfig Config => _parent.NetworkClient.Config;

View file

@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
{ {
public bool NeedsRealId => true; public bool NeedsRealId => true;
private static InitializeMessage InitializeMemory = new InitializeMessage(); private static InitializeMessage InitializeMemory;
private const int InactiveTimeout = 6000; private const int InactiveTimeout = 6000;
private const int FailureTimeout = 4000; private const int FailureTimeout = 4000;

View file

@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
private readonly int _headerSize = Marshal.SizeOf<LdnHeader>(); private readonly int _headerSize = Marshal.SizeOf<LdnHeader>();
private readonly byte[] _buffer = new byte[MaxPacketSize]; private readonly byte[] _buffer = new byte[MaxPacketSize];
private int _bufferEnd = 0; private int _bufferEnd;
// Client Packets. // Client Packets.
public event Action<LdnHeader, InitializeMessage> Initialize; public event Action<LdnHeader, InitializeMessage> Initialize;

View file

@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
class Station : IDisposable class Station : IDisposable
{ {
public NetworkInfo NetworkInfo; public NetworkInfo NetworkInfo;
public Array8<NodeLatestUpdate> LatestUpdates = new(); public Array8<NodeLatestUpdate> LatestUpdates;
private readonly IUserLocalCommunicationService _parent; private readonly IUserLocalCommunicationService _parent;

View file

@ -11,8 +11,8 @@ namespace Ryujinx.HLE.HOS.Services.Mii
{ {
class MiiDatabaseManager class MiiDatabaseManager
{ {
private readonly bool _isTestModeEnabled = false; private readonly bool _isTestModeEnabled;
private uint _mountCounter = 0; private uint _mountCounter;
private const ulong DatabaseTestSaveDataId = 0x8000000000000031; private const ulong DatabaseTestSaveDataId = 0x8000000000000031;
private const ulong DatabaseSaveDataId = 0x8000000000000030; private const ulong DatabaseSaveDataId = 0x8000000000000030;

View file

@ -13,9 +13,9 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
{ {
private readonly GeneralServiceDetail _generalServiceDetail; private readonly GeneralServiceDetail _generalServiceDetail;
private IPInterfaceProperties _targetPropertiesCache = null; private IPInterfaceProperties _targetPropertiesCache;
private UnicastIPAddressInformation _targetAddressInfoCache = null; private UnicastIPAddressInformation _targetAddressInfoCache;
private string _cacheChosenInterface = null; private string _cacheChosenInterface;
public IGeneralService() public IGeneralService()
{ {

View file

@ -52,10 +52,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv
private IVirtualMemoryManager _clientMemory; private IVirtualMemoryManager _clientMemory;
private ulong _owner; private ulong _owner;
private bool _transferMemInitialized = false; private bool _transferMemInitialized;
// TODO: This should call set:sys::GetDebugModeFlag // TODO: This should call set:sys::GetDebugModeFlag
private readonly bool _debugModeEnabled = false; private readonly bool _debugModeEnabled;
public INvDrvServices(ServiceCtx context) : base(context.Device.System.NvDrvServer) public INvDrvServices(ServiceCtx context) : base(context.Device.System.NvDrvServer)
{ {

View file

@ -15,11 +15,11 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
private int[] _ratingAge; private int[] _ratingAge;
// TODO: Find where they are set. // TODO: Find where they are set.
private readonly bool _restrictionEnabled = false; private readonly bool _restrictionEnabled;
private readonly bool _featuresRestriction = false; private readonly bool _featuresRestriction;
private bool _freeCommunicationEnabled = false; private bool _freeCommunicationEnabled;
private readonly bool _stereoVisionRestrictionConfigurable = true; private readonly bool _stereoVisionRestrictionConfigurable = true;
private bool _stereoVisionRestriction = false; private bool _stereoVisionRestriction;
#pragma warning restore IDE0052, CS0414 #pragma warning restore IDE0052, CS0414
public IParentalControlService(ServiceCtx context, ulong pid, bool withInitialize, int permissionFlag) public IParentalControlService(ServiceCtx context, ulong pid, bool withInitialize, int permissionFlag)

View file

@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst
[Service("clkrst:i")] // 8.0.0+ [Service("clkrst:i")] // 8.0.0+
class IClkrstManager : IpcService class IClkrstManager : IpcService
{ {
private int _moduleStateTableEventHandle = 0; private int _moduleStateTableEventHandle;
public IClkrstManager(ServiceCtx context) { } public IClkrstManager(ServiceCtx context) { }

View file

@ -40,7 +40,7 @@ namespace Ryujinx.HLE.HOS.Services
private KProcess _selfProcess; private KProcess _selfProcess;
private KThread _selfThread; private KThread _selfThread;
private KEvent _wakeEvent; private KEvent _wakeEvent;
private int _wakeHandle = 0; private int _wakeHandle;
private readonly ReaderWriterLockSlim _handleLock = new(); private readonly ReaderWriterLockSlim _handleLock = new();
private readonly Dictionary<int, IpcService> _sessions = new(); private readonly Dictionary<int, IpcService> _sessions = new();
@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services
private readonly MemoryStream _responseDataStream; private readonly MemoryStream _responseDataStream;
private readonly BinaryWriter _responseDataWriter; private readonly BinaryWriter _responseDataWriter;
private int _isDisposed = 0; private int _isDisposed;
public ManualResetEvent InitDone { get; } public ManualResetEvent InitDone { get; }
public string Name { get; } public string Name { get; }

View file

@ -186,7 +186,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
} }
} }
bool hasEmittedBlockingWarning = false; bool hasEmittedBlockingWarning;
public LinuxError Receive(out int receiveSize, Span<byte> buffer, BsdSocketFlags flags) public LinuxError Receive(out int receiveSize, Span<byte> buffer, BsdSocketFlags flags)
{ {

View file

@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd
private readonly FqdnResolver _fqdnResolver; private readonly FqdnResolver _fqdnResolver;
#pragma warning restore IDE0052 #pragma warning restore IDE0052
private readonly bool _isInitialized = false; private readonly bool _isInitialized;
public IManager(ServiceCtx context) public IManager(ServiceCtx context)
{ {

View file

@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
{ {
private static readonly Dictionary<int, IBinder> _registeredBinderObjects = new(); private static readonly Dictionary<int, IBinder> _registeredBinderObjects = new();
private static int _lastBinderId = 0; private static int _lastBinderId;
private static readonly Lock _lock = new(); private static readonly Lock _lock = new();

View file

@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
private readonly TimeManager _timeManager; private readonly TimeManager _timeManager;
private readonly TimePermissions _permissions; private readonly TimePermissions _permissions;
private int _timeSharedMemoryNativeHandle = 0; private int _timeSharedMemoryNativeHandle;
public IStaticServiceForPsc(ServiceCtx context, TimePermissions permissions) : this(TimeManager.Instance, permissions) { } public IStaticServiceForPsc(ServiceCtx context, TimePermissions permissions) : this(TimeManager.Instance, permissions) { }

View file

@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Tamper
private readonly IOperation _entryPoint; private readonly IOperation _entryPoint;
public string Name { get; } public string Name { get; }
public bool TampersCodeMemory { get; set; } = false; public bool TampersCodeMemory { get; set; }
public ITamperedProcess Process { get; } public ITamperedProcess Process { get; }
public bool IsEnabled { get; set; } public bool IsEnabled { get; set; }

View file

@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Tamper
{ {
class Register : IOperand class Register : IOperand
{ {
private ulong _register = 0; private ulong _register;
private readonly string _alias; private readonly string _alias;
public Register(string alias) public Register(string alias)

View file

@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Tamper
public ProcessState State => _process.State; public ProcessState State => _process.State;
public bool TamperedCodeMemory { get; set; } = false; public bool TamperedCodeMemory { get; set; }
public TamperedKProcess(KProcess process) public TamperedKProcess(KProcess process)
{ {

View file

@ -16,9 +16,9 @@ namespace Ryujinx.HLE.HOS
// cheat and the re-execution of the first one. // cheat and the re-execution of the first one.
private const int TamperMachineSleepMs = 1000 / 12; private const int TamperMachineSleepMs = 1000 / 12;
private Thread _tamperThread = null; private Thread _tamperThread;
private readonly ConcurrentQueue<ITamperProgram> _programs = new(); private readonly ConcurrentQueue<ITamperProgram> _programs = new();
private long _pressedKeys = 0; private long _pressedKeys;
private readonly Dictionary<string, ITamperProgram> _programDictionary = new(); private readonly Dictionary<string, ITamperProgram> _programDictionary = new();
private void Activate() private void Activate()

View file

@ -30,7 +30,7 @@ namespace Ryujinx.HLE
public IHostUIHandler UIHandler { get; } public IHostUIHandler UIHandler { get; }
public VSyncMode VSyncMode { get; set; } = VSyncMode.Switch; public VSyncMode VSyncMode { get; set; } = VSyncMode.Switch;
public bool CustomVSyncIntervalEnabled { get; set; } = false; public bool CustomVSyncIntervalEnabled { get; set; }
public int CustomVSyncInterval { get; set; } public int CustomVSyncInterval { get; set; }
public long TargetVSyncInterval { get; set; } = 60; public long TargetVSyncInterval { get; set; } = 60;

View file

@ -34,7 +34,7 @@ namespace Ryujinx.Headless.SDL2
protected const int DefaultHeight = 720; protected const int DefaultHeight = 720;
private const int TargetFps = 60; private const int TargetFps = 60;
private SDL_WindowFlags DefaultFlags = SDL_WindowFlags.SDL_WINDOW_ALLOW_HIGHDPI | SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS | SDL_WindowFlags.SDL_WINDOW_SHOWN; private SDL_WindowFlags DefaultFlags = SDL_WindowFlags.SDL_WINDOW_ALLOW_HIGHDPI | SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS | SDL_WindowFlags.SDL_WINDOW_SHOWN;
private SDL_WindowFlags FullscreenFlag = 0; private SDL_WindowFlags FullscreenFlag;
private static readonly ConcurrentQueue<Action> _mainThreadActions = new(); private static readonly ConcurrentQueue<Action> _mainThreadActions = new();

View file

@ -60,8 +60,8 @@ namespace Ryujinx.Memory.Tracking
private readonly MemoryTracking _tracking; private readonly MemoryTracking _tracking;
private bool _disposed; private bool _disposed;
private int _checkCount = 0; private int _checkCount;
private int _volatileCount = 0; private int _volatileCount;
private bool _volatile; private bool _volatile;
internal MemoryPermission RequiredPermission internal MemoryPermission RequiredPermission

View file

@ -10,7 +10,7 @@ namespace Ryujinx.Tests.Memory
{ {
public bool UsesPrivateAllocations => false; public bool UsesPrivateAllocations => false;
public bool NoMappings = false; public bool NoMappings;
public event Action<ulong, ulong, MemoryPermission> OnProtect; public event Action<ulong, ulong, MemoryPermission> OnProtect;

View file

@ -19,10 +19,10 @@ namespace Ryujinx.Tests.Cpu
protected static ulong DataBaseAddress = CodeBaseAddress + Size; protected static ulong DataBaseAddress = CodeBaseAddress + Size;
#pragma warning restore CA2211 #pragma warning restore CA2211
private static readonly bool _ignoreFpcrFz = false; private static readonly bool _ignoreFpcrFz;
private static readonly bool _ignoreFpcrDn = false; private static readonly bool _ignoreFpcrDn;
private static readonly bool _ignoreAllExceptFpsrQc = false; private static readonly bool _ignoreAllExceptFpsrQc;
private ulong _currAddress; private ulong _currAddress;

View file

@ -58,9 +58,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
#region "AluImm & Csel" #region "AluImm & Csel"
[Test, Pairwise] [Test, Pairwise]

View file

@ -57,9 +57,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise] [Test, Pairwise]
public void Vmsr_Vcmp_Vmrs([ValueSource(nameof(_1S_F_))] ulong a, public void Vmsr_Vcmp_Vmrs([ValueSource(nameof(_1S_F_))] ulong a,

View file

@ -1251,9 +1251,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise, Description("ABS <V><d>, <V><n>")] [Test, Pairwise, Description("ABS <V><d>, <V><n>")]
public void Abs_S_D([Values(0u)] uint rd, public void Abs_S_D([Values(0u)] uint rd,

View file

@ -179,9 +179,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise, Description("SHA256SU0.32 <Qd>, <Qm>")] [Test, Pairwise, Description("SHA256SU0.32 <Qd>, <Qm>")]
public void Sha256su0_V([Values(0xF3BA03C0u)] uint opcode, public void Sha256su0_V([Values(0xF3BA03C0u)] uint opcode,

View file

@ -370,9 +370,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise] [Test, Pairwise]
[Explicit] [Explicit]

View file

@ -161,9 +161,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Explicit] [Explicit]
[Test, Pairwise, Description("VCVT.<dt>.F32 <Sd>, <Sm>")] [Test, Pairwise, Description("VCVT.<dt>.F32 <Sd>, <Sm>")]

View file

@ -135,9 +135,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private const int RndCntNzcv = 2; private const int RndCntNzcv = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise] [Test, Pairwise]
[Explicit] [Explicit]

View file

@ -600,9 +600,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise, Description("ADD <V><d>, <V><n>, <V><m>")] [Test, Pairwise, Description("ADD <V><d>, <V><n>, <V><m>")]
public void Add_S_D([Values(0u)] uint rd, public void Add_S_D([Values(0u)] uint rd,

View file

@ -272,9 +272,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise, Description("SHA256H.32 <Qd>, <Qn>, <Qm>")] [Test, Pairwise, Description("SHA256H.32 <Qd>, <Qn>, <Qm>")]
public void Sha256h_V([Values(0xF3000C40u)] uint opcode, public void Sha256h_V([Values(0xF3000C40u)] uint opcode,

View file

@ -213,9 +213,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
// Fused. // Fused.
[Test, Pairwise] [Test, Pairwise]

View file

@ -539,9 +539,9 @@ namespace Ryujinx.Tests.Cpu
private const int RndCnt = 2; private const int RndCnt = 2;
private static readonly bool _noZeros = false; private static readonly bool _noZeros;
private static readonly bool _noInfs = false; private static readonly bool _noInfs;
private static readonly bool _noNaNs = false; private static readonly bool _noNaNs;
[Test, Pairwise] [Test, Pairwise]
[Explicit] [Explicit]

View file

@ -94,7 +94,7 @@ namespace Ryujinx.Ava
private long _lastCursorMoveTime; private long _lastCursorMoveTime;
private bool _isCursorInRenderer = true; private bool _isCursorInRenderer = true;
private bool _ignoreCursorState = false; private bool _ignoreCursorState;
private enum CursorStates private enum CursorStates
{ {
@ -108,7 +108,7 @@ namespace Ryujinx.Ava
private DateTime _lastShaderReset; private DateTime _lastShaderReset;
private uint _displayCount; private uint _displayCount;
private uint _previousCount = 0; private uint _previousCount;
private bool _isStopped; private bool _isStopped;
private bool _isActive; private bool _isActive;

View file

@ -7,7 +7,7 @@ namespace Ryujinx.Ava.UI.Models
{ {
public class CheatNode : BaseModel public class CheatNode : BaseModel
{ {
private bool _isEnabled = false; private bool _isEnabled;
public ObservableCollection<CheatNode> SubNodes { get; } = new(); public ObservableCollection<CheatNode> SubNodes { get; } = new();
public string CleanName => Name[1..^7]; public string CleanName => Name[1..^7];
public string BuildIdKey => $"{BuildId}-{Name}"; public string BuildIdKey => $"{BuildId}-{Name}";

View file

@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private AvaloniaList<DownloadableContentModel> _downloadableContents = new(); private AvaloniaList<DownloadableContentModel> _downloadableContents = new();
private AvaloniaList<DownloadableContentModel> _selectedDownloadableContents = new(); private AvaloniaList<DownloadableContentModel> _selectedDownloadableContents = new();
private AvaloniaList<DownloadableContentModel> _views = new(); private AvaloniaList<DownloadableContentModel> _views = new();
private bool _showBundledContentNotice = false; private bool _showBundledContentNotice;
private string _search; private string _search;
private readonly ApplicationData _applicationData; private readonly ApplicationData _applicationData;

View file

@ -26,7 +26,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private AvaloniaList<TitleUpdateModel> _titleUpdates = new(); private AvaloniaList<TitleUpdateModel> _titleUpdates = new();
private AvaloniaList<object> _views = new(); private AvaloniaList<object> _views = new();
private object _selectedUpdate = new TitleUpdateViewNoUpdateSentinal(); private object _selectedUpdate = new TitleUpdateViewNoUpdateSentinal();
private bool _showBundledContentNotice = false; private bool _showBundledContentNotice;
public AvaloniaList<TitleUpdateModel> TitleUpdates public AvaloniaList<TitleUpdateModel> TitleUpdates
{ {