From 77b5b16de414f0ecd922a4eb51df4aea0a204358 Mon Sep 17 00:00:00 2001 From: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Date: Mon, 25 May 2026 05:04:04 -0400 Subject: [PATCH] Fix: Splitscreen for proper backend detection --- .../Windows64/Network/WinsockNetLayer.cpp | 12 +++++++----- Minecraft.Client/Windows64/Network/WinsockNetLayer.h | 6 ++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp index 8fb570bb..2e07f4ff 100644 --- a/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp @@ -1,5 +1,6 @@ -// Code implemented by LCEMP, credit if used on other repos -// https://github.com/LCEMP/LCEMP +// Written by DrperkyLegit, Improved upon by Str1k3r/MCLEMP +// https://github.com/DrPerkyLegit +// https://github.com/mclemp #include "stdafx.h" @@ -390,7 +391,7 @@ bool WinsockNetLayer::JoinGame(const char* ip, int port) std::string authToken = Windows64Launcher::GetAuthenticationToken(); #endif std::string hostname(ip); - std::string req = "JOIN " + authToken + " 0 " + hostname + "\n"; + std::string req = "JOIN " + authToken + " 0 " + hostname + " 0\n"; send(s_hostConnectionSocket, req.c_str(), (int)req.length(), 0); BYTE assignBuf[1]; @@ -550,7 +551,7 @@ DWORD WINAPI WinsockNetLayer::JoinThreadProc(LPVOID param) std::string authToken = Windows64Launcher::GetAuthenticationToken(); #endif std::string hostname(s_joinIP); - std::string req = "JOIN " + authToken + " 0 " + hostname + "\n"; + std::string req = "JOIN " + authToken + " 0 " + hostname + " 0\n"; send(sock, req.c_str(), (int)req.length(), 0); BYTE assignBuf[1]; @@ -1209,7 +1210,8 @@ bool WinsockNetLayer::JoinSplitScreen(int padIndex, BYTE* outSmallId) std::string authToken = Windows64Launcher::GetAuthenticationToken(); #endif std::string hostname(g_Win64MultiplayerIP); - std::string req = "JOIN " + authToken + " 0 " + hostname + "\n"; + std::string req = "JOIN " + authToken + " 0 " + hostname + " 1\n"; + app.DebugPrintf("Win64 LAN: Sending JOIN request: %s", req.c_str()); send(sock, req.c_str(), (int)req.length(), 0); BYTE assignBuf[1]; diff --git a/Minecraft.Client/Windows64/Network/WinsockNetLayer.h b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h index 9fc1e559..0029a3dd 100644 --- a/Minecraft.Client/Windows64/Network/WinsockNetLayer.h +++ b/Minecraft.Client/Windows64/Network/WinsockNetLayer.h @@ -1,5 +1,7 @@ -// Code implemented by LCEMP, credit if used on other repos -// https://github.com/LCEMP/LCEMP +// Written by DrperkyLegit, Improved upon by Str1k3r/MCLEMP +// https://github.com/DrPerkyLegit +// https://github.com/mclemp + #pragma once #ifdef _WINDOWS64