diff options
| author | Ac_K <Acoustik666@gmail.com> | 2023-01-08 13:13:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-08 12:13:39 +0000 |
| commit | 550747eac6c0f6da14070c8b6d208bde6f1d1eb9 (patch) | |
| tree | 1be203777156dae17a4221589c852c638b273d94 /Ryujinx.Horizon/Sm/UserService.cs | |
| parent | 3ffceab1fb220c13f5982de599d788f2e3e7cc47 (diff) | |
Horizon: Impl Prepo, Fixes bugs, Clean things (#4220)
* Horizon: Impl Prepo, Fixes bugs, Clean things
* remove ToArray()
* resultCode > status
* Remove old services
* Addresses gdkchan's comments and more cleanup
* Addresses Gdkchan's feedback 2
* Reorganize services, make sure service are loaded before guest
Co-Authored-By: gdkchan <5624669+gdkchan@users.noreply.github.com>
* Create interfaces for lm and sm
Co-authored-by: gdkchan <5624669+gdkchan@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Horizon/Sm/UserService.cs')
| -rw-r--r-- | Ryujinx.Horizon/Sm/UserService.cs | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/Ryujinx.Horizon/Sm/UserService.cs b/Ryujinx.Horizon/Sm/UserService.cs deleted file mode 100644 index d3b4537b..00000000 --- a/Ryujinx.Horizon/Sm/UserService.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Sf; -using Ryujinx.Horizon.Sdk.Sm; -using Ryujinx.Horizon.Sm.Impl; - -namespace Ryujinx.Horizon.Sm -{ - partial class UserService : IServiceObject - { - private readonly ServiceManager _serviceManager; - - private ulong _clientProcessId; - private bool _initialized; - - public UserService(ServiceManager serviceManager) - { - _serviceManager = serviceManager; - } - - [CmifCommand(0)] - public Result Initialize([ClientProcessId] ulong clientProcessId) - { - _clientProcessId = clientProcessId; - _initialized = true; - - return Result.Success; - } - - [CmifCommand(1)] - public Result GetService([MoveHandle] out int handle, ServiceName name) - { - if (!_initialized) - { - handle = 0; - - return SmResult.InvalidClient; - } - - return _serviceManager.GetService(out handle, _clientProcessId, name); - } - - [CmifCommand(2)] - public Result RegisterService([MoveHandle] out int handle, ServiceName name, int maxSessions, bool isLight) - { - if (!_initialized) - { - handle = 0; - - return SmResult.InvalidClient; - } - - return _serviceManager.RegisterService(out handle, _clientProcessId, name, maxSessions, isLight); - } - - [CmifCommand(3)] - public Result UnregisterService(ServiceName name) - { - if (!_initialized) - { - return SmResult.InvalidClient; - } - - return _serviceManager.UnregisterService(_clientProcessId, name); - } - } -} |
