aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2019-07-12 03:13:43 +0200
committergdkchan <gab.dark.100@gmail.com>2019-07-11 22:13:43 -0300
commit560ccbeb2d55a4426ad2827bf7534d4a695431c2 (patch)
tree7e224acbd6c023ea56ff80c6207aa0966aa06ee5 /Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs
parentf723f6f39aaf7b1cebc0224a055058d62e3b689c (diff)
Refactoring commands handling (#728)
* Refactoring commands handling - Use Reflection to handle commands ID. - Add all symbols (from SwIPC so not all time accurate). - Re-sort some services commands methods. - Some cleanup. - Keep some empty constructor for consistency. * Fix order in IProfile
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs25
1 files changed, 7 insertions, 18 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs
index 377f484d..5128d792 100644
--- a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs
+++ b/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs
@@ -2,10 +2,8 @@ using LibHac.Fs;
using LibHac.Fs.NcaUtils;
using Ryujinx.Common.Logging;
using Ryujinx.HLE.FileSystem;
-using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.SystemState;
using System;
-using System.Collections.Generic;
using System.IO;
using System.Text;
@@ -14,28 +12,16 @@ namespace Ryujinx.HLE.HOS.Services.Set
[Service("set:sys")]
class ISystemSettingsServer : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
-
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
-
- public ISystemSettingsServer(ServiceCtx context)
- {
- _commands = new Dictionary<int, ServiceProcessRequest>
- {
- { 3, GetFirmwareVersion },
- { 4, GetFirmwareVersion2 },
- { 23, GetColorSetId },
- { 24, SetColorSetId },
- { 38, GetSettingsItemValue }
- };
- }
+ public ISystemSettingsServer(ServiceCtx context) { }
+ [Command(3)]
// GetFirmwareVersion() -> buffer<nn::settings::system::FirmwareVersion, 0x1a, 0x100>
public static long GetFirmwareVersion(ServiceCtx context)
{
return GetFirmwareVersion2(context);
}
+ [Command(4)]
// GetFirmwareVersion2() -> buffer<nn::settings::system::FirmwareVersion, 0x1a, 0x100>
public static long GetFirmwareVersion2(ServiceCtx context)
{
@@ -95,6 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
return 0;
}
+ [Command(23)]
// GetColorSetId() -> i32
public static long GetColorSetId(ServiceCtx context)
{
@@ -103,6 +90,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
return 0;
}
+ [Command(24)]
// GetColorSetId() -> i32
public static long SetColorSetId(ServiceCtx context)
{
@@ -113,6 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
return 0;
}
+ [Command(38)]
// GetSettingsItemValue(buffer<nn::settings::SettingsName, 0x19, 0x48>, buffer<nn::settings::SettingsItemKey, 0x19, 0x48>) -> (u64, buffer<unknown, 6, 0>)
public static long GetSettingsItemValue(ServiceCtx context)
{
@@ -206,4 +195,4 @@ namespace Ryujinx.HLE.HOS.Services.Set
}
}
}
-}
+} \ No newline at end of file