Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
30
src/Ryujinx.Horizon/Sm/SmServerManager.cs
Normal file
30
src/Ryujinx.Horizon/Sm/SmServerManager.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using Ryujinx.Horizon.Common;
|
||||
using Ryujinx.Horizon.Sdk.Sf.Hipc;
|
||||
using Ryujinx.Horizon.Sdk.Sm;
|
||||
using Ryujinx.Horizon.Sm.Impl;
|
||||
using Ryujinx.Horizon.Sm.Ipc;
|
||||
using Ryujinx.Horizon.Sm.Types;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Horizon.Sm
|
||||
{
|
||||
class SmServerManager : ServerManager
|
||||
{
|
||||
private readonly ServiceManager _serviceManager;
|
||||
|
||||
public SmServerManager(ServiceManager serviceManager, HeapAllocator allocator, SmApi sm, int maxPorts, ManagerOptions options, int maxSessions) : base(allocator, sm, maxPorts, options, maxSessions)
|
||||
{
|
||||
_serviceManager = serviceManager;
|
||||
}
|
||||
|
||||
protected override Result OnNeedsToAccept(int portIndex, Server server)
|
||||
{
|
||||
return (SmPortIndex)portIndex switch
|
||||
{
|
||||
SmPortIndex.User => AcceptImpl(server, new UserService(_serviceManager)),
|
||||
SmPortIndex.Manager => AcceptImpl(server, new ManagerService()),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(portIndex)),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue