Clean up `nuContReadNWImpl`

This commit is contained in:
gijs 2023-10-22 13:45:36 +02:00
parent 7bd27f68e3
commit c71a4b27ee
1 changed files with 13 additions and 11 deletions

View File

@ -103,18 +103,20 @@ void nuContReadImpl(Arg___calls_read_controller_1* arg) {
nuContReadDataImpl(arg->data, 0); nuContReadDataImpl(arg->data, 0);
} }
s32 nuContReadNWImpl(s16* arg0) { s32 nuContReadNWImpl(NUSiCommonMesg* mesg) {
s32 var_v0; s32 rtn;
osRecvMesg(&nuContWaitMesgQ, NULL, 0); osRecvMesg(&nuContWaitMesgQ, NULL, OS_MESG_NOBLOCK);
var_v0 = nuContReadDataImpl(nuContData, 0);
if (var_v0 == 0) { rtn = nuContReadDataImpl(nuContData, 0);
if (nuContReadFunc != NULL) { if (rtn) {
nuContReadFunc(*arg0); return rtn;
} }
return 0;
} else { if(nuContReadFunc != NULL) {
return var_v0; (*nuContReadFunc)(mesg->mesg);
} }
return rtn;
} }