diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst')
3 files changed, 15 insertions, 14 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/ClkrstManager/IClkrstSession.cs b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/ClkrstManager/IClkrstSession.cs index b81e7fee..a3ca56bf 100644 --- a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/ClkrstManager/IClkrstSession.cs +++ b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/ClkrstManager/IClkrstSession.cs @@ -6,32 +6,33 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst.ClkrstManager { class IClkrstSession : IpcService { - private DeviceCode _deviceCode; - private uint _unknown; - private uint _clockRate; + private readonly DeviceCode _deviceCode; +#pragma warning disable IDE0052 // Remove unread private member + private readonly uint _unknown; +#pragma warning restore IDE0052 + private uint _clockRate; - private DeviceCode[] allowedDeviceCodeTable = new DeviceCode[] - { + private readonly DeviceCode[] _allowedDeviceCodeTable = { DeviceCode.Cpu, DeviceCode.Gpu, DeviceCode.Disp1, DeviceCode.Disp2, DeviceCode.Tsec, DeviceCode.Mselect, DeviceCode.Sor1, DeviceCode.Host1x, DeviceCode.Vic, DeviceCode.Nvenc, DeviceCode.Nvjpg, DeviceCode.Nvdec, DeviceCode.Ape, DeviceCode.AudioDsp, DeviceCode.Emc, DeviceCode.Dsi, DeviceCode.SysBus, DeviceCode.XusbSs, DeviceCode.XusbHost, DeviceCode.XusbDevice, - DeviceCode.Gpuaux, DeviceCode.Pcie, DeviceCode.Apbdma, DeviceCode.Sdmmc1, - DeviceCode.Sdmmc2, DeviceCode.Sdmmc4 + DeviceCode.Gpuaux, DeviceCode.Pcie, DeviceCode.Apbdma, DeviceCode.Sdmmc1, + DeviceCode.Sdmmc2, DeviceCode.Sdmmc4, }; public IClkrstSession(DeviceCode deviceCode, uint unknown) { _deviceCode = deviceCode; - _unknown = unknown; + _unknown = unknown; } [CommandCmif(7)] // SetClockRate(u32 hz) public ResultCode SetClockRate(ServiceCtx context) { - if (!allowedDeviceCodeTable.Contains(_deviceCode)) + if (!_allowedDeviceCodeTable.Contains(_deviceCode)) { return ResultCode.InvalidArgument; } @@ -47,7 +48,7 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst.ClkrstManager // GetClockRate() -> u32 hz public ResultCode GetClockRate(ServiceCtx context) { - if (!allowedDeviceCodeTable.Contains(_deviceCode)) + if (!_allowedDeviceCodeTable.Contains(_deviceCode)) { return ResultCode.InvalidArgument; } @@ -59,4 +60,4 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst.ClkrstManager return ResultCode.Success; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs index 6f1e5d25..492ffa57 100644 --- a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs @@ -5,4 +5,4 @@ { public IArbitrationManager(ServiceCtx context) { } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs index 4ba2f094..2e18dba7 100644 --- a/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs @@ -19,7 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst public ResultCode OpenSession(ServiceCtx context) { DeviceCode deviceCode = (DeviceCode)context.RequestData.ReadUInt32(); - uint unknown = context.RequestData.ReadUInt32(); + uint unknown = context.RequestData.ReadUInt32(); // TODO: Service checks the deviceCode and the unk value. @@ -54,4 +54,4 @@ namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst return ResultCode.Success; } } -}
\ No newline at end of file +} |
