From 9cae62096a543f084469ab28832ac903012e4c9f Mon Sep 17 00:00:00 2001 From: Coxxs <58-coxxs@users.noreply.git.ryujinx.app> Date: Sat, 14 Mar 2026 13:57:49 -0500 Subject: [PATCH] HLE: Implement CreateContextForSystem (ryubing/ryujinx!285) See merge request ryubing/ryujinx!285 --- src/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs b/src/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs index 8f38f293f..3d8fb5d51 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs @@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl public ISslService(ServiceCtx context) { } [CommandCmif(0)] - // CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object + // CreateContext(nn::ssl::sf::SslVersion, u64 pid_placeholder, pid) -> object public ResultCode CreateContext(ServiceCtx context) { SslVersion sslVersion = (SslVersion)context.RequestData.ReadUInt32(); @@ -126,14 +126,18 @@ namespace Ryujinx.HLE.HOS.Services.Ssl } [CommandCmif(100)] - // CreateContextForSystem(u64 pid, nn::ssl::sf::SslVersion, u64) + // CreateContextForSystem(nn::ssl::sf::SslVersion, u64 pid_placeholder, pid) -> object public ResultCode CreateContextForSystem(ServiceCtx context) { - ulong pid = context.RequestData.ReadUInt64(); SslVersion sslVersion = (SslVersion)context.RequestData.ReadUInt32(); +#pragma warning disable IDE0059 // Remove unnecessary value assignment ulong pidPlaceholder = context.RequestData.ReadUInt64(); +#pragma warning restore IDE0059 - Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { pid, sslVersion, pidPlaceholder }); + // Note: We use ISslContext here instead of ISslContextForSystem class because Ryujinx implements both in one class. + MakeObject(context, new ISslContext(context.Request.HandleDesc.PId, sslVersion)); + + Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { sslVersion }); return ResultCode.Success; }