ServiceEntry.cs
1 using Ryujinx.Horizon.Common; 2 using Ryujinx.Memory; 3 using System; 4 5 namespace Ryujinx.Horizon 6 { 7 public readonly struct ServiceEntry 8 { 9 private readonly Action<ServiceTable> _entrypoint; 10 private readonly ServiceTable _serviceTable; 11 private readonly HorizonOptions _options; 12 13 internal ServiceEntry(Action<ServiceTable> entrypoint, ServiceTable serviceTable, HorizonOptions options) 14 { 15 _entrypoint = entrypoint; 16 _serviceTable = serviceTable; 17 _options = options; 18 } 19 20 public void Start(ISyscallApi syscallApi, IVirtualMemoryManager addressSpace, IThreadContext threadContext) 21 { 22 HorizonStatic.Register(_options, syscallApi, addressSpace, threadContext, (int)threadContext.GetX(1)); 23 24 _entrypoint(_serviceTable); 25 } 26 } 27 }