Skip to content

Commit

Permalink
Something about the definition of insanity
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Sep 8, 2024
1 parent 9ec92b4 commit 7235293
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libogc/exi.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId)
if(ret) {
id = 0xffffffff;
cnt = 0;
while(cnt<10) {
while(cnt<4) {
if((ret=EXI_GetIDEx(nChn,nDev,nId))==0) break;
if(id==*nId) break;
id = *nId;
Expand Down Expand Up @@ -708,15 +708,13 @@ s32 EXI_GetIDEx(s32 nChn,s32 nDev,u32 *nId)
s32 ret;
u32 reg;

*nId = 0xffffffff;
if(nDev==sdgecko_getDevice(nChn)
&& sdgecko_isInitialized(nChn)) {
*nId = 0xffffffff;
&& sdgecko_isInitialized(nChn))
return 1;
}

ret = 0;
reg = 0;
*nId = 0;
if(EXI_Select(nChn,nDev,EXI_SPEED1MHZ)==0) return 0;
if(EXI_ImmEx(nChn,&reg,2,EXI_WRITE)==0) ret |= 0x01;
if(EXI_ImmEx(nChn,nId,4,EXI_READWRITE)==0) ret |= 0x02;
Expand Down

0 comments on commit 7235293

Please sign in to comment.