From 016d66f866533248fa582304e4f8bf9eb046b06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 12 Jan 2025 12:38:47 +0100 Subject: [PATCH] sceNetInet: Stop resetting inetLastErrno to 0 in sceNetInetGetErrno() This fixes MOHH on Windows. --- Core/HLE/sceNetInet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceNetInet.cpp b/Core/HLE/sceNetInet.cpp index 724f414cfa..7f6d9f7500 100644 --- a/Core/HLE/sceNetInet.cpp +++ b/Core/HLE/sceNetInet.cpp @@ -53,7 +53,7 @@ static int sceNetInetGetErrno() { if (inetLastErrno == 0) inetLastErrno = socket_errno; int error = convertInetErrnoHost2PSP(inetLastErrno); - inetLastErrno = 0; + // We should not reset inetLastErrno to 0 here. This breaks MOHH. return hleLogSuccessInfoI(Log::sceNet, error, "at %08x", currentMIPS->pc); } @@ -61,7 +61,7 @@ static int sceNetInetGetPspError() { if (inetLastErrno == 0) inetLastErrno = socket_errno; int error = convertInetErrno2PSPError(convertInetErrnoHost2PSP(inetLastErrno)); - inetLastErrno = 0; + // We should not reset inetLastErrno to 0 here. return hleLogSuccessInfoI(Log::sceNet, error, "at %08x", currentMIPS->pc); }