mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 09:02:44 +00:00
(WiiU) fix netplay.
This commit is contained in:
parent
e18a5716e3
commit
5a92ec15cf
@ -158,6 +158,8 @@ static INLINE bool isagain(int bytes)
|
|||||||
return true;
|
return true;
|
||||||
#elif defined(VITA)
|
#elif defined(VITA)
|
||||||
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
|
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
|
||||||
|
#elif defined(WIIU)
|
||||||
|
return (bytes == -1) && ((socketlasterr() == SO_SUCCESS) || (socketlasterr() == SO_EWOULDBLOCK));
|
||||||
#else
|
#else
|
||||||
return (bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
|
return (bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TCP_NODELAY 0x2004
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SOL_SOCKET 0xFFFF
|
#define SOL_SOCKET -1
|
||||||
|
|
||||||
#define INADDR_ANY 0
|
#define INADDR_ANY 0
|
||||||
|
|
||||||
@ -24,6 +24,11 @@ extern "C" {
|
|||||||
#define SO_NBIO 0x1014
|
#define SO_NBIO 0x1014
|
||||||
|
|
||||||
|
|
||||||
|
// return codes
|
||||||
|
#define SO_SUCCESS 0
|
||||||
|
#define SO_EWOULDBLOCK 6
|
||||||
|
|
||||||
|
|
||||||
typedef uint32_t socklen_t;
|
typedef uint32_t socklen_t;
|
||||||
typedef uint16_t sa_family_t;
|
typedef uint16_t sa_family_t;
|
||||||
|
|
||||||
@ -63,6 +68,8 @@ int shutdown(int sockfd, int how);
|
|||||||
int socket(int domain, int type, int protocol);
|
int socket(int domain, int type, int protocol);
|
||||||
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
||||||
|
|
||||||
|
int socketlasterr(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -127,6 +127,7 @@ IMPORT(setsockopt);
|
|||||||
IMPORT(shutdown);
|
IMPORT(shutdown);
|
||||||
IMPORT(socket);
|
IMPORT(socket);
|
||||||
IMPORT(select);
|
IMPORT(select);
|
||||||
|
IMPORT(socketlasterr);
|
||||||
|
|
||||||
IMPORT_END();
|
IMPORT_END();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user