mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #19830 from hrydgard/socket-remap-prep
Socket remap prep
This commit is contained in:
commit
3b81cb9f2a
7 changed files with 19 additions and 13 deletions
|
@ -429,7 +429,7 @@ int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector<std::string> &
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(WINDOWS)
|
||||
|
|
|
@ -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?
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(WINDOWS)
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#include "Common/Net/SocketCompat.h"
|
||||
|
||||
#include <memory>
|
||||
#include <shared_mutex>
|
||||
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue