aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/ServiceEntry.cs
blob: 3fea46c1939a32c9d21b0b91d278970dbb59aad7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Ryujinx.Horizon.Common;
using Ryujinx.Memory;
using System;

namespace Ryujinx.Horizon
{
    public struct ServiceEntry
    {
        private readonly Action _entrypoint;
        private readonly HorizonOptions _options;

        internal ServiceEntry(Action entrypoint, HorizonOptions options)
        {
            _entrypoint = entrypoint;
            _options = options;
        }

        public void Start(ISyscallApi syscallApi, IVirtualMemoryManager addressSpace, IThreadContext threadContext)
        {
            HorizonStatic.Register(_options, syscallApi, addressSpace, threadContext, (int)threadContext.GetX(1));

            _entrypoint();
        }
    }
}