From 833a38b4436445679766c94f7cc6679e52120603 Mon Sep 17 00:00:00 2001 From: Maufeat Date: Sun, 18 Jan 2026 02:21:59 +0100 Subject: [PATCH] [hle] adds SetProtocol to user local communication (#3329) Stubs SetProtocol needed for Animal Crossing 3.0 LDN SwitchBrew documentation: https://switchbrew.org/wiki/LDN_services#SetProtocol Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3329 Reviewed-by: MaranBr Reviewed-by: Lizzie Co-authored-by: Maufeat Co-committed-by: Maufeat --- .../hle/service/ldn/user_local_communication_service.cpp | 6 ++++++ src/core/hle/service/ldn/user_local_communication_service.h | 2 ++ src/core/hle/service/pctl/parental_control_service.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/ldn/user_local_communication_service.cpp b/src/core/hle/service/ldn/user_local_communication_service.cpp index d6a67ed75b..1e984a9782 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.cpp +++ b/src/core/hle/service/ldn/user_local_communication_service.cpp @@ -38,6 +38,7 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys {102, D<&IUserLocalCommunicationService::Scan>, "Scan"}, {103, D<&IUserLocalCommunicationService::ScanPrivate>, "ScanPrivate"}, {104, D<&IUserLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"}, + { 106, D<&IUserLocalCommunicationService::SetProtocol>, "SetProtocol" }, {200, D<&IUserLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"}, {201, D<&IUserLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"}, {202, D<&IUserLocalCommunicationService::CreateNetwork>, "CreateNetwork"}, @@ -188,6 +189,11 @@ Result IUserLocalCommunicationService::ScanPrivate( R_RETURN(lan_discovery.Scan(out_network_info, *network_count, scan_filter)); } +Result IUserLocalCommunicationService::SetProtocol(u32 protocol) { + LOG_WARNING(Service_LDN, "(STUBBED) called, protocol={}", protocol); + R_SUCCEED(); +} + Result IUserLocalCommunicationService::SetWirelessControllerRestriction( WirelessControllerRestriction wireless_restriction) { LOG_WARNING(Service_LDN, "(STUBBED) called"); diff --git a/src/core/hle/service/ldn/user_local_communication_service.h b/src/core/hle/service/ldn/user_local_communication_service.h index 55320fbc91..1e725ed531 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.h +++ b/src/core/hle/service/ldn/user_local_communication_service.h @@ -49,6 +49,8 @@ private: Result ScanPrivate(Out network_count, WifiChannel channel, const ScanFilter& scan_filter, OutArray out_network_info); + Result SetProtocol(u32 protocol); + Result SetWirelessControllerRestriction(WirelessControllerRestriction wireless_restriction); Result OpenAccessPoint(); diff --git a/src/core/hle/service/pctl/parental_control_service.cpp b/src/core/hle/service/pctl/parental_control_service.cpp index a712353cb1..c2ddbcbc51 100644 --- a/src/core/hle/service/pctl/parental_control_service.cpp +++ b/src/core/hle/service/pctl/parental_control_service.cpp @@ -292,7 +292,7 @@ Result IParentalControlService::EndFreeCommunication() { } Result IParentalControlService::IsFreeCommunicationAvailable() { - LOG_WARNING(Service_PCTL, "(STUBBED) called"); + LOG_DEBUG(Service_PCTL, "(STUBBED) called"); if (!CheckFreeCommunicationPermissionImpl()) { R_THROW(PCTL::ResultNoFreeCommunication);