From a8022ca3a1c9c2f312855c7676454507031be644 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 11 May 2021 19:57:21 -0300 Subject: Fix race in SM initialization (#2280) --- Ryujinx.HLE/HOS/Services/ServerBase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/ServerBase.cs') diff --git a/Ryujinx.HLE/HOS/Services/ServerBase.cs b/Ryujinx.HLE/HOS/Services/ServerBase.cs index 5b9834dc..c9d009a9 100644 --- a/Ryujinx.HLE/HOS/Services/ServerBase.cs +++ b/Ryujinx.HLE/HOS/Services/ServerBase.cs @@ -38,13 +38,14 @@ namespace Ryujinx.HLE.HOS.Services private readonly Dictionary> _ports = new Dictionary>(); public ManualResetEvent InitDone { get; } - public Func SmObjectFactory { get; set; } + public Func SmObjectFactory { get; } public string Name { get; } - public ServerBase(KernelContext context, string name) + public ServerBase(KernelContext context, string name, Func smObjectFactory = null) { InitDone = new ManualResetEvent(false); Name = name; + SmObjectFactory = smObjectFactory; _context = context; const ProcessCreationFlags flags = -- cgit v1.2.3