mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-02-23 13:49:50 +01:00
misc: chore: convert split ThreadStatic fields & property getter/setters into a single property with [field: ThreadStatic]
This commit is contained in:
parent
5ab50680b4
commit
d8549f687b
@ -18,26 +18,20 @@ namespace Ryujinx.Horizon
|
||||
|
||||
public static event Action<MessagePackObject> PlayReport;
|
||||
|
||||
[ThreadStatic]
|
||||
private static HorizonOptions _options;
|
||||
[field: ThreadStatic]
|
||||
public static HorizonOptions Options { get; private set; }
|
||||
|
||||
[ThreadStatic]
|
||||
private static ISyscallApi _syscall;
|
||||
[field: ThreadStatic]
|
||||
public static ISyscallApi Syscall { get; private set; }
|
||||
|
||||
[ThreadStatic]
|
||||
private static IVirtualMemoryManager _addressSpace;
|
||||
[field: ThreadStatic]
|
||||
public static IVirtualMemoryManager AddressSpace { get; private set; }
|
||||
|
||||
[ThreadStatic]
|
||||
private static IThreadContext _threadContext;
|
||||
[field: ThreadStatic]
|
||||
public static IThreadContext ThreadContext { get; private set; }
|
||||
|
||||
[ThreadStatic]
|
||||
private static int _threadHandle;
|
||||
|
||||
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;
|
||||
[field: ThreadStatic]
|
||||
public static int CurrentThreadHandle { get; private set; }
|
||||
|
||||
public static void Register(
|
||||
HorizonOptions options,
|
||||
@ -46,11 +40,11 @@ namespace Ryujinx.Horizon
|
||||
IThreadContext threadContext,
|
||||
int threadHandle)
|
||||
{
|
||||
_options = options;
|
||||
_syscall = syscallApi;
|
||||
_addressSpace = addressSpace;
|
||||
_threadContext = threadContext;
|
||||
_threadHandle = threadHandle;
|
||||
Options = options;
|
||||
Syscall = syscallApi;
|
||||
AddressSpace = addressSpace;
|
||||
ThreadContext = threadContext;
|
||||
CurrentThreadHandle = threadHandle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user