HorizonStatic.cs
1 using Ryujinx.Horizon.Common; 2 using Ryujinx.Memory; 3 using System; 4 5 namespace Ryujinx.Horizon 6 { 7 public static class HorizonStatic 8 { 9 [ThreadStatic] 10 private static HorizonOptions _options; 11 12 [ThreadStatic] 13 private static ISyscallApi _syscall; 14 15 [ThreadStatic] 16 private static IVirtualMemoryManager _addressSpace; 17 18 [ThreadStatic] 19 private static IThreadContext _threadContext; 20 21 [ThreadStatic] 22 private static int _threadHandle; 23 24 public static HorizonOptions Options => _options; 25 public static ISyscallApi Syscall => _syscall; 26 public static IVirtualMemoryManager AddressSpace => _addressSpace; 27 public static IThreadContext ThreadContext => _threadContext; 28 public static int CurrentThreadHandle => _threadHandle; 29 30 public static void Register( 31 HorizonOptions options, 32 ISyscallApi syscallApi, 33 IVirtualMemoryManager addressSpace, 34 IThreadContext threadContext, 35 int threadHandle) 36 { 37 _options = options; 38 _syscall = syscallApi; 39 _addressSpace = addressSpace; 40 _threadContext = threadContext; 41 _threadHandle = threadHandle; 42 } 43 } 44 }