aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/Sm/Impl/ServiceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Horizon/Sm/Impl/ServiceManager.cs')
-rw-r--r--Ryujinx.Horizon/Sm/Impl/ServiceManager.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/Ryujinx.Horizon/Sm/Impl/ServiceManager.cs b/Ryujinx.Horizon/Sm/Impl/ServiceManager.cs
index 44a1ec46..d1f94267 100644
--- a/Ryujinx.Horizon/Sm/Impl/ServiceManager.cs
+++ b/Ryujinx.Horizon/Sm/Impl/ServiceManager.cs
@@ -37,12 +37,7 @@ namespace Ryujinx.Horizon.Sm.Impl
result = GetServiceImpl(out handle, ref _services[serviceIndex]);
- if (result == KernelResult.SessionCountExceeded)
- {
- return SmResult.OutOfSessions;
- }
-
- return result;
+ return result == KernelResult.SessionCountExceeded ? SmResult.OutOfSessions : result;
}
private Result GetServiceImpl(out int handle, ref ServiceInfo serviceInfo)
@@ -61,13 +56,7 @@ namespace Ryujinx.Horizon.Sm.Impl
}
// TODO: Validation with GetProcessInfo etc.
-
- if (HasServiceInfo(name))
- {
- return SmResult.AlreadyRegistered;
- }
-
- return RegisterServiceImpl(out handle, processId, name, maxSessions, isLight);
+ return HasServiceInfo(name) ? SmResult.AlreadyRegistered : RegisterServiceImpl(out handle, processId, name, maxSessions, isLight);
}
public Result RegisterServiceForSelf(out int handle, ServiceName name, int maxSessions)