summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/nwm_uds.cpp11
-rw-r--r--src/core/hle/service/soc_u.cpp8
2 files changed, 19 insertions, 0 deletions
diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp
index 27e829209..80081aae2 100644
--- a/src/core/hle/service/nwm_uds.cpp
+++ b/src/core/hle/service/nwm_uds.cpp
@@ -97,10 +97,21 @@ static void Initialize(Service::Interface* self) {
u32 value = cmd_buff[13];
u32 handle = cmd_buff[14];
+ // Because NWM service is not implemented at all, we stub the Initialize function with an error
+ // code instead of success to prevent games from using the service and from causing more issues.
+ // The error code is from a real 3DS with wifi off, thus believed to be "network disabled".
+ /*
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 0;
cmd_buff[3] = Kernel::g_handle_table.Create(handle_event)
.MoveFrom(); // TODO(purpasmart): Verify if this is a event handle
+ */
+ cmd_buff[0] = IPC::MakeHeader(0x1B, 1, 2);
+ cmd_buff[1] = ResultCode(static_cast<ErrorDescription>(2), ErrorModule::UDS,
+ ErrorSummary::StatusChanged, ErrorLevel::Status)
+ .raw;
+ cmd_buff[2] = 0;
+ cmd_buff[3] = 0;
LOG_WARNING(Service_NWM, "(STUBBED) called unk1=0x%08X, unk2=0x%08X, value=%u, handle=0x%08X",
unk1, unk2, value, handle);
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index 4279b67fb..46b75db25 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -104,7 +104,9 @@ static const std::unordered_map<int, int> error_map = {{
{ERRNO(ENETUNREACH), 40},
{ENFILE, 41},
{ERRNO(ENOBUFS), 42},
+#ifdef ENODATA
{ENODATA, 43},
+#endif
{ENODEV, 44},
{ENOENT, 45},
{ENOEXEC, 46},
@@ -114,8 +116,12 @@ static const std::unordered_map<int, int> error_map = {{
{ENOMSG, 50},
{ERRNO(ENOPROTOOPT), 51},
{ENOSPC, 52},
+#ifdef ENOSR
{ENOSR, 53},
+#endif
+#ifdef ENOSTR
{ENOSTR, 54},
+#endif
{ENOSYS, 55},
{ERRNO(ENOTCONN), 56},
{ENOTDIR, 57},
@@ -136,7 +142,9 @@ static const std::unordered_map<int, int> error_map = {{
{ESPIPE, 72},
{ESRCH, 73},
{ERRNO(ESTALE), 74},
+#ifdef ETIME
{ETIME, 75},
+#endif
{ERRNO(ETIMEDOUT), 76},
}};