Clean up `nuContReadNWImpl`
This commit is contained in:
parent
7bd27f68e3
commit
c71a4b27ee
|
|
@ -103,18 +103,20 @@ void nuContReadImpl(Arg___calls_read_controller_1* arg) {
|
|||
nuContReadDataImpl(arg->data, 0);
|
||||
}
|
||||
|
||||
s32 nuContReadNWImpl(s16* arg0) {
|
||||
s32 var_v0;
|
||||
s32 nuContReadNWImpl(NUSiCommonMesg* mesg) {
|
||||
s32 rtn;
|
||||
|
||||
osRecvMesg(&nuContWaitMesgQ, NULL, 0);
|
||||
var_v0 = nuContReadDataImpl(nuContData, 0);
|
||||
if (var_v0 == 0) {
|
||||
if (nuContReadFunc != NULL) {
|
||||
nuContReadFunc(*arg0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
return var_v0;
|
||||
osRecvMesg(&nuContWaitMesgQ, NULL, OS_MESG_NOBLOCK);
|
||||
|
||||
rtn = nuContReadDataImpl(nuContData, 0);
|
||||
if (rtn) {
|
||||
return rtn;
|
||||
}
|
||||
|
||||
if(nuContReadFunc != NULL) {
|
||||
(*nuContReadFunc)(mesg->mesg);
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue