VERY experimental Nintendo Switch 2 emulator
C++
hle: service: ldn: IUserLocalCommunicationService: Indicate that LDN is disabled.
bunnei5fc36d40f8cb
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex 1662ec63d1..e74e6a6688 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -400,6 +400,7 @@ add_library(core STATIChle/service/hid/controllers/xpad.hhle/service/lbl/lbl.cpphle/service/lbl/lbl.h+ hle/service/ldn/errors.hhle/service/ldn/ldn.cpphle/service/ldn/ldn.hhle/service/ldr/ldr.cppdiff --git a/src/core/hle/service/ldn/errors.h b/src/core/hle/service/ldn/errors.hnew file mode 100644index 0000000000..a718c5c66b--- /dev/null+++ b/src/core/hle/service/ldn/errors.h@@ -0,0 +1,13 @@+// Copyright 2021 yuzu emulator team+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/result.h"++namespace Service::LDN {++constexpr ResultCode ERROR_DISABLED{ErrorModule::LDN, 22};++} // namespace Service::LDNdiff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cppindex ee908f3990..1c46609aeb 100644--- a/src/core/hle/service/ldn/ldn.cpp+++ b/src/core/hle/service/ldn/ldn.cpp@@ -6,6 +6,7 @@#include "core/hle/ipc_helpers.h"#include "core/hle/result.h"+#include "core/hle/service/ldn/errors.h"#include "core/hle/service/ldn/ldn.h"#include "core/hle/service/sm/sm.h"@@ -140,10 +141,11 @@ public: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.++ // Return the disabled error to indicate that LDN is currently unavailable, otherwise games+ // will continue to try to make a connection.IPC::ResponseBuilder rb{ctx, 2};- rb.Push(RESULT_UNKNOWN);+ rb.Push(ERROR_DISABLED);}};