From c43fb92bbf92dbeedd6b0e6299457e6136919f84 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 22 Feb 2024 13:55:29 -0300 Subject: [PATCH] Ensure service init runs after Horizon constructor (#6342) --- src/Ryujinx.HLE/HOS/Horizon.cs | 3 +-- src/Ryujinx.HLE/Switch.cs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Horizon.cs b/src/Ryujinx.HLE/HOS/Horizon.cs index cd171958..cd3365ce 100644 --- a/src/Ryujinx.HLE/HOS/Horizon.cs +++ b/src/Ryujinx.HLE/HOS/Horizon.cs @@ -250,7 +250,6 @@ namespace Ryujinx.HLE.HOS SurfaceFlinger = new SurfaceFlinger(device); InitializeAudioRenderer(TickSource); - InitializeServices(); } private void InitializeAudioRenderer(ITickSource tickSource) @@ -301,7 +300,7 @@ namespace Ryujinx.HLE.HOS AudioManager.Start(); } - private void InitializeServices() + public void InitializeServices() { SmRegistry = new SmRegistry(); SmServer = new ServerBase(KernelContext, "SmServer", () => new IUserInterface(KernelContext, SmRegistry)); diff --git a/src/Ryujinx.HLE/Switch.cs b/src/Ryujinx.HLE/Switch.cs index 498714dc..912a39b0 100644 --- a/src/Ryujinx.HLE/Switch.cs +++ b/src/Ryujinx.HLE/Switch.cs @@ -55,6 +55,7 @@ namespace Ryujinx.HLE Processes = new ProcessLoader(this); TamperMachine = new TamperMachine(); + System.InitializeServices(); System.State.SetLanguage(Configuration.SystemLanguage); System.State.SetRegion(Configuration.Region);