diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-07-12 03:13:43 +0200 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2019-07-11 22:13:43 -0300 |
| commit | 560ccbeb2d55a4426ad2827bf7534d4a695431c2 (patch) | |
| tree | 7e224acbd6c023ea56ff80c6207aa0966aa06ee5 /Ryujinx.HLE/HOS/Services/Ldr | |
| parent | f723f6f39aaf7b1cebc0224a055058d62e3b689c (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/Ldr')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs index 8820e2d4..b1de4e07 100644 --- a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs @@ -98,10 +98,6 @@ namespace Ryujinx.HLE.HOS.Services.Ldr [Service("ldr:ro")] class IRoInterface : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; - private const int MaxNrr = 0x40; private const int MaxNro = 0x40; @@ -115,15 +111,6 @@ namespace Ryujinx.HLE.HOS.Services.Ldr public IRoInterface(ServiceCtx context) { - _commands = new Dictionary<int, ServiceProcessRequest> - { - { 0, LoadNro }, - { 1, UnloadNro }, - { 2, LoadNrr }, - { 3, UnloadNrr }, - { 4, Initialize } - }; - _nrrInfos = new List<NrrInfo>(MaxNrr); _nroInfos = new List<NroInfo>(MaxNro); } @@ -448,6 +435,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return MakeError(ErrorModule.Loader, LoaderErr.BadNroAddress); } + [Command(0)] // LoadNro(u64, u64, u64, u64, u64, pid) -> u64 public long LoadNro(ServiceCtx context) { @@ -485,6 +473,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return result; } + [Command(1)] // UnloadNro(u64, u64, pid) public long UnloadNro(ServiceCtx context) { @@ -508,6 +497,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return result; } + [Command(2)] // LoadNrr(u64, u64, u64, pid) public long LoadNrr(ServiceCtx context) { @@ -540,6 +530,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return result; } + [Command(3)] // UnloadNrr(u64, u64, pid) public long UnloadNrr(ServiceCtx context) { @@ -563,6 +554,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return result; } + [Command(4)] // Initialize(u64, pid, KObject) public long Initialize(ServiceCtx context) { @@ -572,4 +564,4 @@ namespace Ryujinx.HLE.HOS.Services.Ldr return 0; } } -} +}
\ No newline at end of file |
