[Ryujinx.HLE] Address dotnet-format issues (#5380)
* dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Silence dotnet format IDE0060 warnings * Silence dotnet format IDE0052 warnings * Address or silence dotnet format IDE1006 warnings * Address dotnet format CA1816 warnings * Address or silence dotnet format CA2208 warnings * Address or silence dotnet format CA1806 and a few CA1854 warnings * Address dotnet format CA2211 warnings * Address dotnet format CA1822 warnings * Address or silence dotnet format CA1069 warnings * Make dotnet format succeed in style mode * Address or silence dotnet format CA2211 warnings * Address review comments * Address dotnet format CA2208 warnings properly * Make ProcessResult readonly * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Add previously silenced warnings back I have no clue how these disappeared * Revert formatting changes for while and for-loops * Format if-blocks correctly * Run dotnet format style after rebase * Run dotnet format whitespace after rebase * Run dotnet format style after rebase * Run dotnet format analyzers after rebase * Run dotnet format after rebase and remove unused usings - analyzers - style - whitespace * Disable 'prefer switch expression' rule * Add comments to disabled warnings * Fix a few disabled warnings * Fix naming rule violation, Convert shader properties to auto-property and convert values to const * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Start working on disabled warnings * Fix and silence a few dotnet-format warnings again * Run dotnet format after rebase * Use using declaration instead of block syntax * Address IDE0251 warnings * Address a few disabled IDE0060 warnings * Silence IDE0060 in .editorconfig * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First dotnet format pass * Fix naming rule violations * Fix typo * Add trailing commas, use targeted new and use array initializer * Fix build issues * Fix remaining build issues * Remove SuppressMessage for CA1069 where possible * Address dotnet format issues * Address formatting issues Co-authored-by: Ac_K <acoustik666@gmail.com> * Add GetHashCode implementation for RenderingSurfaceInfo * Explicitly silence CA1822 for every affected method in Syscall * Address formatting issues in Demangler.cs * Address review feedback Co-authored-by: Ac_K <acoustik666@gmail.com> * Revert marking service methods as static * Next dotnet format pass * Address review feedback --------- Co-authored-by: Ac_K <acoustik666@gmail.com>
This commit is contained in:
parent
fec8291c17
commit
326749498b
1015 changed files with 8173 additions and 7615 deletions
|
@ -40,4 +40,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,4 +16,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
// SetPerformanceConfiguration(nn::apm::PerformanceMode, nn::apm::PerformanceConfiguration)
|
||||
public ResultCode SetPerformanceConfiguration(ServiceCtx context)
|
||||
{
|
||||
PerformanceMode performanceMode = (PerformanceMode)context.RequestData.ReadInt32();
|
||||
PerformanceMode performanceMode = (PerformanceMode)context.RequestData.ReadInt32();
|
||||
PerformanceConfiguration performanceConfiguration = (PerformanceConfiguration)context.RequestData.ReadInt32();
|
||||
|
||||
return SetPerformanceConfiguration(performanceMode, performanceConfiguration);
|
||||
|
@ -42,4 +42,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,4 +39,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,4 +28,4 @@
|
|||
return _context.Device.System.PerformanceState.CpuOverclockEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
public bool CpuOverclockEnabled = false;
|
||||
|
||||
public PerformanceMode PerformanceMode = PerformanceMode.Default;
|
||||
public CpuBoostMode CpuBoostMode = CpuBoostMode.Disabled;
|
||||
public CpuBoostMode CpuBoostMode = CpuBoostMode.Disabled;
|
||||
|
||||
public PerformanceConfiguration DefaultPerformanceConfiguration = PerformanceConfiguration.PerformanceConfiguration7;
|
||||
public PerformanceConfiguration BoostPerformanceConfiguration = PerformanceConfiguration.PerformanceConfiguration8;
|
||||
public PerformanceConfiguration BoostPerformanceConfiguration = PerformanceConfiguration.PerformanceConfiguration8;
|
||||
|
||||
public PerformanceConfiguration GetCurrentPerformanceConfiguration(PerformanceMode performanceMode)
|
||||
{
|
||||
return performanceMode switch
|
||||
{
|
||||
PerformanceMode.Default => DefaultPerformanceConfiguration,
|
||||
PerformanceMode.Boost => BoostPerformanceConfiguration,
|
||||
_ => PerformanceConfiguration.PerformanceConfiguration7
|
||||
PerformanceMode.Boost => BoostPerformanceConfiguration,
|
||||
_ => PerformanceConfiguration.PerformanceConfiguration7,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
{
|
||||
enum ResultCode
|
||||
{
|
||||
ModuleId = 148,
|
||||
ModuleId = 148,
|
||||
ErrorCodeShift = 9,
|
||||
|
||||
Success = 0,
|
||||
|
||||
InvalidParameters = (1 << ErrorCodeShift) | ModuleId
|
||||
InvalidParameters = (1 << ErrorCodeShift) | ModuleId,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
{
|
||||
private readonly ServiceCtx _context;
|
||||
|
||||
public SessionServer(ServiceCtx context) : base(context)
|
||||
public SessionServer(ServiceCtx context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
@ -55,4 +55,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
|||
// NOTE: This call seems to overclock the system, since we emulate it, it's fine to do nothing instead.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,4 +25,4 @@
|
|||
return _context.Device.System.PerformanceState.GetCurrentPerformanceConfiguration(_context.Device.System.PerformanceState.PerformanceMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{
|
||||
enum CpuBoostMode
|
||||
{
|
||||
Disabled = 0,
|
||||
BoostCPU = 1, // Uses PerformanceConfiguration13 and PerformanceConfiguration14, or PerformanceConfiguration15 and PerformanceConfiguration16
|
||||
ConservePower = 2 // Uses PerformanceConfiguration15 and PerformanceConfiguration16.
|
||||
Disabled = 0,
|
||||
BoostCPU = 1, // Uses PerformanceConfiguration13 and PerformanceConfiguration14, or PerformanceConfiguration15 and PerformanceConfiguration16
|
||||
ConservePower = 2, // Uses PerformanceConfiguration15 and PerformanceConfiguration16.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
{
|
||||
enum PerformanceConfiguration : uint // Clocks are all in MHz.
|
||||
{ // CPU | GPU | RAM | NOTE
|
||||
PerformanceConfiguration1 = 0x00010000, // 1020 | 384 | 1600 | Only available while docked.
|
||||
PerformanceConfiguration2 = 0x00010001, // 1020 | 768 | 1600 | Only available while docked.
|
||||
PerformanceConfiguration3 = 0x00010002, // 1224 | 691.2 | 1600 | Only available for SDEV units.
|
||||
PerformanceConfiguration4 = 0x00020000, // 1020 | 230.4 | 1600 | Only available for SDEV units.
|
||||
PerformanceConfiguration5 = 0x00020001, // 1020 | 307.2 | 1600 |
|
||||
PerformanceConfiguration6 = 0x00020002, // 1224 | 230.4 | 1600 |
|
||||
PerformanceConfiguration7 = 0x00020003, // 1020 | 307 | 1331.2 |
|
||||
PerformanceConfiguration8 = 0x00020004, // 1020 | 384 | 1331.2 |
|
||||
PerformanceConfiguration9 = 0x00020005, // 1020 | 307.2 | 1065.6 |
|
||||
PerformanceConfiguration1 = 0x00010000, // 1020 | 384 | 1600 | Only available while docked.
|
||||
PerformanceConfiguration2 = 0x00010001, // 1020 | 768 | 1600 | Only available while docked.
|
||||
PerformanceConfiguration3 = 0x00010002, // 1224 | 691.2 | 1600 | Only available for SDEV units.
|
||||
PerformanceConfiguration4 = 0x00020000, // 1020 | 230.4 | 1600 | Only available for SDEV units.
|
||||
PerformanceConfiguration5 = 0x00020001, // 1020 | 307.2 | 1600 |
|
||||
PerformanceConfiguration6 = 0x00020002, // 1224 | 230.4 | 1600 |
|
||||
PerformanceConfiguration7 = 0x00020003, // 1020 | 307 | 1331.2 |
|
||||
PerformanceConfiguration8 = 0x00020004, // 1020 | 384 | 1331.2 |
|
||||
PerformanceConfiguration9 = 0x00020005, // 1020 | 307.2 | 1065.6 |
|
||||
PerformanceConfiguration10 = 0x00020006, // 1020 | 384 | 1065.6 |
|
||||
PerformanceConfiguration11 = 0x92220007, // 1020 | 460.8 | 1600 |
|
||||
PerformanceConfiguration12 = 0x92220008, // 1020 | 460.8 | 1331.2 |
|
||||
PerformanceConfiguration13 = 0x92220009, // 1785 | 768 | 1600 | 7.0.0+
|
||||
PerformanceConfiguration14 = 0x9222000A, // 1785 | 768 | 1331.2 | 7.0.0+
|
||||
PerformanceConfiguration15 = 0x9222000B, // 1020 | 768 | 1600 | 7.0.0+
|
||||
PerformanceConfiguration16 = 0x9222000C // 1020 | 768 | 1331.2 | 7.0.0+
|
||||
PerformanceConfiguration16 = 0x9222000C, // 1020 | 768 | 1331.2 | 7.0.0+
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
enum PerformanceMode : uint
|
||||
{
|
||||
Default = 0,
|
||||
Boost = 1
|
||||
Boost = 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue