From 72a8b41fd5fb3a25868eed1b05ef26f91dea92df Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Sat, 31 Oct 2026 03:02:17 -0400 Subject: bsd: handle the Switch 2 client registration command 36 Switch 2 titles register with bsd 36 (16 bytes and the pid, a bsd errno back) instead of RegisterClient. It was nullptr, so the errno was left to the message buffer's leftovers and Minecraft's socket layer failed later. Answer it like RegisterClient. --- src/core/hle/service/sockets/bsd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 0137a3be66..9ec5e38c41 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -1121,7 +1121,10 @@ BSD_USA::BSD_USA(Core::System& system_, const char* name, bool is_user_) {33, nullptr, "RegisterClientShared"}, //10.0.0+ {34, nullptr, "GetSocketStatistics"}, //15.0.0+ {35, nullptr, "NifIoctl"}, //17.0.0+ - {36, nullptr, "Unknown36"}, //18.0.0+ + // Switch 2 titles register with 36 (16 bytes and the pid; a bsd errno back) instead of + // RegisterClient. The auto stub left the errno to the message buffer's leftovers, and + // Minecraft's socket layer failed later in EventFd. + {36, &BSD_USA::RegisterClient, "RegisterClientSwitch2"}, //18.0.0+ {37, nullptr, "Unknown37"}, //18.0.0+ {38, nullptr, "Unknown38"}, //18.0.0+ {39, nullptr, "Unknown39"}, //20.0.0+ -- cgit v1.2.3