mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-22 03:59:16 +01:00
Replace __gh_errno_ptr() by socketlasterr()
This commit is contained in:
parent
03d827c436
commit
ae5fbd4f84
@ -22,8 +22,6 @@
|
||||
|
||||
#include <wut_types.h>
|
||||
|
||||
extern int32_t * (* __gh_errno_ptr)(void);
|
||||
|
||||
#include <padscore/kpad.h>
|
||||
#include <padscore/wpad.h>
|
||||
#include <vpad/input.h>
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include <utils/logger.h>
|
||||
|
||||
#define wiiu_errno (*__gh_errno_ptr())
|
||||
|
||||
CPTCPServer * CPTCPServer::instance = NULL;
|
||||
|
||||
CPTCPServer::CPTCPServer(s32 port): TCPServer(port,CPTCPServer::getPriority()) {
|
||||
@ -83,7 +81,7 @@ bool CPTCPServer::whileLoop() {
|
||||
}
|
||||
ret = checkbyte(clientfd);
|
||||
if (ret < 0) {
|
||||
if(wiiu_errno != 6) {
|
||||
if(socketlasterr() != 6) {
|
||||
return false;
|
||||
}
|
||||
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <utils/logger.h>
|
||||
|
||||
#define MAX_UDP_SIZE 0x578
|
||||
#define wiiu_errno (*__gh_errno_ptr())
|
||||
|
||||
CThread * UDPServer::pThread = NULL;
|
||||
UDPServer * UDPServer::instance = NULL;
|
||||
@ -103,7 +102,7 @@ void UDPServer::DoUDPThreadInternal(){
|
||||
memset(buffer,0,MAX_UDP_SIZE);
|
||||
n = recv(sockfd,buffer,MAX_UDP_SIZE,0);
|
||||
if (n < 0){
|
||||
s32 errno_ = wiiu_errno;
|
||||
s32 errno_ = socketlasterr();
|
||||
OSSleepTicks(OSMicrosecondsToTicks(2000));
|
||||
if(errno_ != 11 && errno_ != 9){
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user