mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-22 03:59:16 +01:00
Fix sleep duration (Milliseconds -> Microseconds)
This commit is contained in:
parent
07314ec15b
commit
ec2e5dd8e3
@ -86,7 +86,7 @@ bool CPTCPServer::whileLoop() {
|
|||||||
if(wiiu_errno != 6) {
|
if(wiiu_errno != 6) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000));
|
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//DEBUG_FUNCTION_LINE("got byte from tcp! %01X\n",ret);
|
//DEBUG_FUNCTION_LINE("got byte from tcp! %01X\n",ret);
|
||||||
|
@ -104,7 +104,7 @@ void UDPServer::DoUDPThreadInternal(){
|
|||||||
n = recv(sockfd,buffer,MAX_UDP_SIZE,0);
|
n = recv(sockfd,buffer,MAX_UDP_SIZE,0);
|
||||||
if (n < 0){
|
if (n < 0){
|
||||||
s32 errno_ = wiiu_errno;
|
s32 errno_ = wiiu_errno;
|
||||||
OSSleepTicks(OSMillisecondsToTicks(2000));
|
OSSleepTicks(OSMicrosecondsToTicks(2000));
|
||||||
if(errno_ != 11 && errno_ != 9){
|
if(errno_ != 11 && errno_ != 9){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ void ControllerPatcherHID::myHIDReadCallback(u32 handle, s32 error, unsigned cha
|
|||||||
HIDReadCallback(handle,buf,bytes_transfered,usr);
|
HIDReadCallback(handle,buf,bytes_transfered,usr);
|
||||||
|
|
||||||
if(usr->slotdata.hidmask == gHID_LIST_DS4){
|
if(usr->slotdata.hidmask == gHID_LIST_DS4){
|
||||||
OSSleepTicks(OSMillisecondsToTicks(2000)); //DS4 is way tooo fast. sleeping to reduce lag. (need to check the other pads)
|
OSSleepTicks(OSMicrosecondsToTicks(2000)); //DS4 is way tooo fast. sleeping to reduce lag. (need to check the other pads)
|
||||||
}
|
}
|
||||||
HIDRead(handle, usr->buf, bytes_transfered, myHIDReadCallback, usr);
|
HIDRead(handle, usr->buf, bytes_transfered, myHIDReadCallback, usr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user