mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 15:32:01 +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;
|
||||
#elif defined(VITA)
|
||||
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
|
||||
return (bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define TCP_NODELAY 0x2004
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 0xFFFF
|
||||
#define SOL_SOCKET -1
|
||||
|
||||
#define INADDR_ANY 0
|
||||
|
||||
@ -24,6 +24,11 @@ extern "C" {
|
||||
#define SO_NBIO 0x1014
|
||||
|
||||
|
||||
// return codes
|
||||
#define SO_SUCCESS 0
|
||||
#define SO_EWOULDBLOCK 6
|
||||
|
||||
|
||||
typedef uint32_t socklen_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 select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
||||
|
||||
int socketlasterr(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -127,6 +127,7 @@ IMPORT(setsockopt);
|
||||
IMPORT(shutdown);
|
||||
IMPORT(socket);
|
||||
IMPORT(select);
|
||||
IMPORT(socketlasterr);
|
||||
|
||||
IMPORT_END();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user