From abca04c8f926d781a591f957c46f9c8d9a7a048b Mon Sep 17 00:00:00 2001 From: Shyanne Date: Wed, 28 Jan 2026 00:18:21 -0500 Subject: [PATCH] [HLE] Stubbed IUserLocalCommuniationService:SetProtocol (106) Should fix Animal Crossing: New Horizons crashing on LDN connection and potentially other titles with Switch 2 updates. --- .../IUserLocalCommunicationService.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/IUserLocalCommunicationService.cs b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/IUserLocalCommunicationService.cs index 62a86ad91..abf4153d0 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/IUserLocalCommunicationService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/IUserLocalCommunicationService.cs @@ -487,6 +487,23 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator return ResultCode.Success; } + [CommandCmif(106)] // 20.0.0+ + // SetProtocol + public ResultCode SetProtocol(ServiceCtx context) + { + uint protocolValue = context.RequestData.ReadUInt32(); + + // On NX only input value 1 or 3 is allowed, with an error being thrown otherwise. + if (protocolValue != 1 || protocolValue != 3) + { + throw new NotSupportedException($"Protocol value is {protocolValue}!!"); + } + + Logger.Info?.PrintMsg(LogClass.ServiceLdn, $"Protocol value: {protocolValue}"); + Logger.Stub?.PrintMsg(LogClass.ServiceLdn, "IUserLocalCommunicationService SetProtocol: Stubbed."); + return ResultCode.Success; + } + [CommandCmif(200)] // OpenAccessPoint() public ResultCode OpenAccessPoint(ServiceCtx context)