Skip to content

Commit

Permalink
More ps3 networking fixs.
Browse files Browse the repository at this point in the history
  • Loading branch information
clienthax committed Dec 19, 2017
1 parent a565ba0 commit 73aa381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion libretro-common/include/net/net_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ static INLINE bool isagain(int bytes)
if (WSAGetLastError() != WSAEWOULDBLOCK)
return false;
return true;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
return (sys_net_errno == SYS_NET_EWOULDBLOCK) || (sys_net_errno == SYS_NET_EAGAIN);//35
#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
Expand Down
6 changes: 0 additions & 6 deletions libretro-common/net/net_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ int getaddrinfo_retro(const char *node, const char *service,
in_addr->sin_family = AF_INET;
in_addr->sin_port = inet_htons(strtoul(service, NULL, 0));

//sin_port seems to be the wrong endian for ps3
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
in_addr->sin_port = (in_addr->sin_port>>8) | (in_addr->sin_port<<8);
#endif


if (!node && (hints->ai_flags & AI_PASSIVE))
in_addr->sin_addr.s_addr = INADDR_ANY;
else if (node && isdigit(*node))
Expand Down

0 comments on commit 73aa381

Please sign in to comment.