diff options
| author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-07-16 19:31:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-16 19:31:14 +0200 |
| commit | 326749498bed4360e5a4b11fc67d5ec7cb9a3076 (patch) | |
| tree | ae21fb26f99b401ca4e9efaab72b679a81c22369 /src/Ryujinx.HLE/HOS/Services/Apm | |
| parent | fec8291c17fa106c28f58b56419e90d49a41a1ea (diff) | |
[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>
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Apm')
12 files changed, 34 insertions, 34 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/IManager.cs b/src/Ryujinx.HLE/HOS/Services/Apm/IManager.cs index 72e39a77..83215bef 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/IManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/IManager.cs @@ -40,4 +40,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm return ResultCode.Success; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/IManagerPrivileged.cs b/src/Ryujinx.HLE/HOS/Services/Apm/IManagerPrivileged.cs index 9620c30a..bb0049d1 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/IManagerPrivileged.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/IManagerPrivileged.cs @@ -16,4 +16,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm return ResultCode.Success; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/ISession.cs b/src/Ryujinx.HLE/HOS/Services/Apm/ISession.cs index f828cd17..6ee69605 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/ISession.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/ISession.cs @@ -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; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/ISystemManager.cs b/src/Ryujinx.HLE/HOS/Services/Apm/ISystemManager.cs index 9d2c7b0b..375423cf 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/ISystemManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/ISystemManager.cs @@ -39,4 +39,4 @@ namespace Ryujinx.HLE.HOS.Services.Apm return ResultCode.Success; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/ManagerServer.cs b/src/Ryujinx.HLE/HOS/Services/Apm/ManagerServer.cs index af051934..9a3a0462 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/ManagerServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/ManagerServer.cs @@ -28,4 +28,4 @@ return _context.Device.System.PerformanceState.CpuOverclockEnabled; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/PerformanceState.cs b/src/Ryujinx.HLE/HOS/Services/Apm/PerformanceState.cs index d03bf6c7..0fb6c28a 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/PerformanceState.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/PerformanceState.cs @@ -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, }; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/ResultCode.cs b/src/Ryujinx.HLE/HOS/Services/Apm/ResultCode.cs index c4499b01..3cbfbffb 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/ResultCode.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/ResultCode.cs @@ -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, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/SessionServer.cs b/src/Ryujinx.HLE/HOS/Services/Apm/SessionServer.cs index 3ef713cf..260992be 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/SessionServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/SessionServer.cs @@ -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. } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs b/src/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs index a6264236..3fe5b383 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs @@ -25,4 +25,4 @@ return _context.Device.System.PerformanceState.GetCurrentPerformanceConfiguration(_context.Device.System.PerformanceState.PerformanceMode); } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs b/src/Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs index 587142c8..c84d32ba 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs @@ -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. } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs b/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs index e8c5752e..6dd193f9 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs @@ -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+ } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs b/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs index 6d6f9643..0a771965 100644 --- a/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs +++ b/src/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs @@ -3,6 +3,6 @@ enum PerformanceMode : uint { Default = 0, - Boost = 1 + Boost = 1, } -}
\ No newline at end of file +} |
