2023-12-04 14:17:13 +01:00
|
|
|
using Ryujinx.Horizon.Common;
|
2023-01-04 23:15:45 +01:00
|
|
|
using Ryujinx.Memory;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace Ryujinx.Horizon
|
|
|
|
{
|
2023-09-14 09:50:19 +02:00
|
|
|
public static class HorizonStatic
|
2023-01-04 23:15:45 +01:00
|
|
|
{
|
|
|
|
[ThreadStatic]
|
|
|
|
private static HorizonOptions _options;
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
private static ISyscallApi _syscall;
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
private static IVirtualMemoryManager _addressSpace;
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
private static IThreadContext _threadContext;
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
private static int _threadHandle;
|
|
|
|
|
2023-07-01 12:42:10 +02:00
|
|
|
public static HorizonOptions Options => _options;
|
|
|
|
public static ISyscallApi Syscall => _syscall;
|
|
|
|
public static IVirtualMemoryManager AddressSpace => _addressSpace;
|
|
|
|
public static IThreadContext ThreadContext => _threadContext;
|
|
|
|
public static int CurrentThreadHandle => _threadHandle;
|
2023-01-04 23:15:45 +01:00
|
|
|
|
|
|
|
public static void Register(
|
2023-07-01 12:42:10 +02:00
|
|
|
HorizonOptions options,
|
|
|
|
ISyscallApi syscallApi,
|
2023-01-04 23:15:45 +01:00
|
|
|
IVirtualMemoryManager addressSpace,
|
2023-07-01 12:42:10 +02:00
|
|
|
IThreadContext threadContext,
|
|
|
|
int threadHandle)
|
2023-01-04 23:15:45 +01:00
|
|
|
{
|
2023-07-01 12:42:10 +02:00
|
|
|
_options = options;
|
|
|
|
_syscall = syscallApi;
|
|
|
|
_addressSpace = addressSpace;
|
2023-01-04 23:15:45 +01:00
|
|
|
_threadContext = threadContext;
|
2023-07-01 12:42:10 +02:00
|
|
|
_threadHandle = threadHandle;
|
2023-01-04 23:15:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|