Skip to content

Commit 54df344

Browse files
committed
fix mcman detection of unformatted card insertion
Before this change, every time mcdetectcard was called from libmc over an unformatted card, the mcsync return value was -2 It should have been -2 if a new unformatted card was inserted since las call, and 0 if the same card remains plugged
1 parent ba63930 commit 54df344

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

iop/memorycard/mcman/src/mcsio2.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -917,18 +917,11 @@ int mcman_probePS2Card(int port, int slot) //2
917917
SecrAuthDongle(2, slot, mcman_getcnum(port, slot));
918918
}
919919
#endif
920-
if (r > 0)
921-
{
922-
DPRINTF("mcman_probePS2Card sio2cmd succeeded\n");
923-
HAKAMA_SIGNALSEMA();
924-
return sceMcResSucceed;
925-
}
926-
else if (r < 0)
927-
{
928-
DPRINTF("mcman_probePS2Card sio2cmd failed (no format)\n");
920+
if (r != 0) {
929921
HAKAMA_SIGNALSEMA();
930-
return sceMcResNoFormat;
931-
}
922+
DPRINTF("mcman_probePS2Card sio2cmd succeeded\n");
923+
return sceMcResSucceed;
924+
}
932925
}
933926

934927
#if !defined(BUILDING_XFROMMAN) && !defined(BUILDING_VMCMAN)

0 commit comments

Comments
 (0)