mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02: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
1 changed files with 15 additions and 21 deletions
|
@ -18,26 +18,20 @@ namespace Ryujinx.Horizon
|
||||||
|
|
||||||
public static event Action<MessagePackObject> PlayReport;
|
public static event Action<MessagePackObject> PlayReport;
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static HorizonOptions _options;
|
public static HorizonOptions Options { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static ISyscallApi _syscall;
|
public static ISyscallApi Syscall { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static IVirtualMemoryManager _addressSpace;
|
public static IVirtualMemoryManager AddressSpace { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static IThreadContext _threadContext;
|
public static IThreadContext ThreadContext { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static int _threadHandle;
|
public static int CurrentThreadHandle { get; private set; }
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
public static void Register(
|
public static void Register(
|
||||||
HorizonOptions options,
|
HorizonOptions options,
|
||||||
|
@ -46,11 +40,11 @@ namespace Ryujinx.Horizon
|
||||||
IThreadContext threadContext,
|
IThreadContext threadContext,
|
||||||
int threadHandle)
|
int threadHandle)
|
||||||
{
|
{
|
||||||
_options = options;
|
Options = options;
|
||||||
_syscall = syscallApi;
|
Syscall = syscallApi;
|
||||||
_addressSpace = addressSpace;
|
AddressSpace = addressSpace;
|
||||||
_threadContext = threadContext;
|
ThreadContext = threadContext;
|
||||||
_threadHandle = threadHandle;
|
CurrentThreadHandle = threadHandle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue