mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-25 19:07:59 +02:00
HLE: Stubbed IUserLocalCommuniationService SetProtocol (106)
Should fix Animal Crossing: New Horizons crashing on LDN connection and potentially other titles with Switch 2 updates.
This commit is contained in:
@@ -5,6 +5,7 @@ using Ryujinx.Common.Logging;
|
|||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using Ryujinx.Common.Utilities;
|
using Ryujinx.Common.Utilities;
|
||||||
using Ryujinx.Cpu;
|
using Ryujinx.Cpu;
|
||||||
|
using Ryujinx.HLE.Exceptions;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||||
using Ryujinx.HLE.HOS.Services.Ldn.Types;
|
using Ryujinx.HLE.HOS.Services.Ldn.Types;
|
||||||
@@ -14,6 +15,7 @@ using Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.Types;
|
|||||||
using Ryujinx.Horizon.Common;
|
using Ryujinx.Horizon.Common;
|
||||||
using Ryujinx.Memory;
|
using Ryujinx.Memory;
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
@@ -490,6 +492,23 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||||||
return ResultCode.Success;
|
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 ArgumentException($"{GetType().FullName}: Protocol value is not 1 or 3!! Protocol value: {protocolValue}");
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceLdn, $"Protocol value: {protocolValue}");
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
[CommandCmif(200)]
|
[CommandCmif(200)]
|
||||||
// OpenAccessPoint()
|
// OpenAccessPoint()
|
||||||
public ResultCode OpenAccessPoint(ServiceCtx context)
|
public ResultCode OpenAccessPoint(ServiceCtx context)
|
||||||
|
|||||||
Reference in New Issue
Block a user