Skip to content

Commit

Permalink
Cache device ID of Serial Port 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Oct 20, 2023
1 parent 73a829c commit 726a174
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libogc/exi.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,9 @@ s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId)
#endif
if(__exi_attach(nChn,NULL)==0) return 0;
idtime = last_exi_idtime[nChn];
} else if(nChn==EXI_CHANNEL_2 && nDev==EXI_DEVICE_0 && exi->exi_id!=0) {
*nId = exi->exi_id;
return 1;
}
#ifdef _EXI_DEBUG
printf("EXI_GetID(interrupts set)\n");
Expand Down Expand Up @@ -658,7 +661,8 @@ s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId)
#ifdef _EXI_DEBUG
printf("EXI_GetID(exi_id = %d)\n",exi->exi_id);
#endif
}
} else if(nChn==EXI_CHANNEL_2 && nDev==EXI_DEVICE_0 && ret)
exi->exi_id = *nId;
return ret;
}

Expand Down

0 comments on commit 726a174

Please sign in to comment.