Fix race in SM initialization (#2280)

This commit is contained in:
gdkchan 2021-05-11 19:57:21 -03:00 committed by GitHub
parent ebdbaa6db0
commit a8022ca3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -274,7 +274,7 @@ namespace Ryujinx.HLE.HOS
public void InitializeServices()
{
IUserInterface sm = new IUserInterface(KernelContext);
sm.TrySetServer(new ServerBase(KernelContext, "SmServer") { SmObjectFactory = () => new IUserInterface(KernelContext) });
sm.TrySetServer(new ServerBase(KernelContext, "SmServer", () => new IUserInterface(KernelContext)));
// Wait until SM server thread is done with initialization,
// only then doing connections to SM is safe.