mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
added case in SetSocketOptions for tony hawk 5
This commit is contained in:
parent
e4d999d147
commit
0b6b2dd903
@ -52,6 +52,13 @@ int PosixSocket::SetSocketOptions(int level, int optname, const void* optval, un
|
|||||||
case ORBIS_NET_SO_SNDTIMEO:
|
case ORBIS_NET_SO_SNDTIMEO:
|
||||||
return ConvertReturnErrorCode(
|
return ConvertReturnErrorCode(
|
||||||
setsockopt(sock, level, SO_SNDTIMEO, (const char*)optval, optlen));
|
setsockopt(sock, level, SO_SNDTIMEO, (const char*)optval, optlen));
|
||||||
|
case ORBIS_NET_SO_ONESBCAST: {
|
||||||
|
if (optlen != sizeof(sockopt_so_onesbcast)) {
|
||||||
|
return ORBIS_NET_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
memcpy(&sockopt_so_onesbcast, optval, optlen);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
case ORBIS_NET_SO_NBIO: {
|
case ORBIS_NET_SO_NBIO: {
|
||||||
if (optlen != sizeof(sockopt_so_nbio)) {
|
if (optlen != sizeof(sockopt_so_nbio)) {
|
||||||
return ORBIS_NET_ERROR_EFAULT;
|
return ORBIS_NET_ERROR_EFAULT;
|
||||||
|
@ -45,6 +45,7 @@ struct Socket {
|
|||||||
struct PosixSocket : public Socket {
|
struct PosixSocket : public Socket {
|
||||||
net_socket sock;
|
net_socket sock;
|
||||||
int sockopt_so_nbio = 0;
|
int sockopt_so_nbio = 0;
|
||||||
|
int sockopt_so_onesbcast = 0;
|
||||||
explicit PosixSocket(int domain, int type, int protocol)
|
explicit PosixSocket(int domain, int type, int protocol)
|
||||||
: Socket(domain, type, protocol), sock(socket(domain, type, protocol)) {}
|
: Socket(domain, type, protocol), sock(socket(domain, type, protocol)) {}
|
||||||
int SetSocketOptions(int level, int optname, const void* optval, unsigned int optlen) override;
|
int SetSocketOptions(int level, int optname, const void* optval, unsigned int optlen) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user