diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index ac5f768fb9..38fdc876bc 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -429,7 +429,7 @@ int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector & int sz = readbuf->TakeLineCRLF(&line); if (!sz || sz < 0) break; - INFO_LOG(Log::HTTP, "Header line: %s", line.c_str()); + VERBOSE_LOG(Log::HTTP, "Header line: %s", line.c_str()); responseHeaders.push_back(line); } diff --git a/Common/Net/SocketCompat.h b/Common/Net/SocketCompat.h index 12ee7e7ea2..15b1dcbd72 100644 --- a/Common/Net/SocketCompat.h +++ b/Common/Net/SocketCompat.h @@ -82,6 +82,7 @@ inline bool connectInProgress(int errcode) { return (errcode == WSAEWOULDBLOCK || errcode == WSAEINPROGRESS || errcode == WSAEALREADY || errcode == WSAEINVAL); } // WSAEINVAL should be treated as WSAEALREADY during connect for backward-compatibility with Winsock 1.1 inline bool isDisconnected(int errcode) { return (errcode == WSAECONNRESET || errcode == WSAECONNABORTED || errcode == WSAESHUTDOWN); } #else +#define SOCKET int #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define closesocket close diff --git a/Core/Dialog/PSPNetconfDialog.cpp b/Core/Dialog/PSPNetconfDialog.cpp index 36fe1be13d..982b31336d 100644 --- a/Core/Dialog/PSPNetconfDialog.cpp +++ b/Core/Dialog/PSPNetconfDialog.cpp @@ -248,6 +248,10 @@ int PSPNetconfDialog::Update(int animSpeed) { UpdateFade(animSpeed); StartDraw(); + // This disables the notice that we don't support the internet below. + // Keeping the code in case we need it for something later. + hideNotice = true; + if (!hideNotice) { auto err = GetI18NCategory(I18NCat::ERRORS); const float WRAP_WIDTH = 254.0f; diff --git a/Core/HLE/NetInetConstants.cpp b/Core/HLE/NetInetConstants.cpp index 13cb1ac818..d4bb411c06 100644 --- a/Core/HLE/NetInetConstants.cpp +++ b/Core/HLE/NetInetConstants.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "ppsspp_config.h" #if PPSSPP_PLATFORM(WINDOWS) diff --git a/Core/HLE/sceNetInet.cpp b/Core/HLE/sceNetInet.cpp index 11baa5d824..3de0c06f16 100644 --- a/Core/HLE/sceNetInet.cpp +++ b/Core/HLE/sceNetInet.cpp @@ -1000,6 +1000,9 @@ static int sceNetInetRecvmsg(int socket, u32 msghdrPtr, int flags) { // TODO: Do similar to the already working sceNetInetSendmsg but in reverse //if (pspMsghdr->msg_name != 0) { ... } + //UNFINISHED + free(iov); + return hleLogError(Log::sceNet, retval); // returns number of bytes received? } diff --git a/Core/HLE/sceNetInet.h b/Core/HLE/sceNetInet.h index 5a77d4963b..f6fd25f299 100644 --- a/Core/HLE/sceNetInet.h +++ b/Core/HLE/sceNetInet.h @@ -4,10 +4,7 @@ #include "Core/HLE/HLE.h" -#if PPSSPP_PLATFORM(WINDOWS) -#include "Common/CommonWindows.h" -#include -#endif +#include "Common/Net/SocketCompat.h" #include #include @@ -106,6 +103,7 @@ typedef struct SceNetInetPollfd { //similar format to pollfd in 32bit (pollfd in } PACK SceNetInetPollfd; // TCP & UDP Socket Union (Internal use only) +/* typedef struct InetSocket { s32_le id; // posix socket id s32_le domain; // AF_INET/PF_INET/etc @@ -115,6 +113,7 @@ typedef struct InetSocket { s32_le so_broadcast; // broadcast flag (ie. SO_BROADCAST) to keep track of the broadcast flag, since we're using fake broadcast s32_le tcp_state; // to keep track TCP connection state } PACK InetSocket; +*/ #ifdef _MSC_VER #pragma pack(pop) diff --git a/Core/HLE/sceNp.cpp b/Core/HLE/sceNp.cpp index dde0bcfb0e..c91c4140d9 100644 --- a/Core/HLE/sceNp.cpp +++ b/Core/HLE/sceNp.cpp @@ -38,17 +38,18 @@ SceNpAuthMemoryStat npAuthMemStat = {}; PSPTimeval npSigninTimestamp{}; // TODO: These should probably be grouped in a struct, since they're used to generate an auth ticket -int npParentalControl = PARENTAL_CONTROL_ENABLED; -int npUserAge = 24; // faking user Age to 24 yo -int npChatRestriction = 0; // default/initial value on Patapon 3 is 1 (restricted boolean?) -SceNpMyLanguages npMyLangList = { 1033, 2057, 1036 }; +constexpr int npParentalControl = PARENTAL_CONTROL_ENABLED; +constexpr int npUserAge = 24; // faking user Age to 24 yo +constexpr int npChatRestriction = 0; // default/initial value on Patapon 3 is 1 (restricted boolean?) +static const SceNpMyLanguages npMyLangList = { 1033, 2057, 1036 }; // Languages the user is assumed to know. No known games make use of this. // Fields are 4-sized, so the data needs to be too. -char npCountryCode[4] = "fr"; // dummy data taken from https://www.psdevwiki.com/ps3/X-I-5-Ticket. France? -char npRegionCode[4] = "c9"; // not sure what "c9" meant, since it was close to country code data, might be region-related data? +static const char npCountryCode[4] = "us"; // dummy data taken from https://www.psdevwiki.com/ps3/X-I-5-Ticket. Mainly affects what EULA is downloaded. +static const char npRegionCode[4] = "c9"; // not sure what "c9" meant, since it was close to country code data, might be region-related data? std::string npOnlineId = "DummyOnlineId"; // SceNpOnlineId struct? std::string npServiceId = ""; // UNO game uses EP2006-NPEH00020_00 std::string npAvatarUrl = "http://DummyAvatarUrl"; // SceNpAvatarUrl struct? +// Game-specific ID, I guess we can use this to auto-choose DNS? SceNpCommunicationId npTitleId; std::recursive_mutex npAuthEvtMtx;