From 6c0eb6026b8e71729bcb5ab8d3c8a5fd9bce1810 Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Sun, 16 Feb 2020 13:14:06 +0700 Subject: [PATCH 1/2] HLE: correct function name of IUserLocalCommunicationService 402: function name should be Initialize2 (7.0.0+) not SetOperationMode Follow by: https://switchbrew.org/wiki/LDN_services#IUserLocalCommunicationService --- src/core/hle/service/ldn/ldn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index ed5059047c..15aa12645d 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp @@ -129,7 +129,7 @@ public: {304, nullptr, "Disconnect"}, {400, nullptr, "Initialize"}, {401, nullptr, "Finalize"}, - {402, nullptr, "SetOperationMode"}, + {402, nullptr, "Initialize2"}, }; // clang-format on From 5257a83ebe837fdbe04dbe39927cac99aabca745 Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Sun, 16 Feb 2020 13:24:34 +0700 Subject: [PATCH 2/2] IUserLocalCommunicationService: add function Initialize2 --- src/core/hle/service/ldn/ldn.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index 15aa12645d..92adde6d46 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp @@ -129,12 +129,20 @@ public: {304, nullptr, "Disconnect"}, {400, nullptr, "Initialize"}, {401, nullptr, "Finalize"}, - {402, nullptr, "Initialize2"}, + {402, &IUserLocalCommunicationService::Initialize2, "Initialize2"}, // 7.0.0+ }; // clang-format on RegisterHandlers(functions); } + + void Initialize2(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + // Result success seem make this services start network and continue. + // If we just pass result error then it will stop and maybe try again and again. + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_UNKNOWN); + } }; class LDNS final : public ServiceFramework {