File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ distribution.
3636#define MMCE_RESULT_BUSY -1
3737#define MMCE_RESULT_WRONGDEVICE -2
3838#define MMCE_RESULT_NOCARD -3
39+ #define MMCE_RESULT_VERSION -4
3940#define MMCE_RESULT_FATAL_ERROR -128
4041
4142#ifdef __cplusplus
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ s32 MMCE_GetDeviceID(s32 chan, u32 *id)
137137 return MMCE_RESULT_NOCARD ;
138138 else if ((* id & ~0xFFFF ) != EXI_MEMCARDPRO )
139139 return MMCE_RESULT_WRONGDEVICE ;
140+ else if ((* id << 16 ) == EXI_MEMCARDPRO || (* id & 0xFFFF ) == 0xFFFF )
141+ return MMCE_RESULT_VERSION ;
140142 else
141143 return MMCE_RESULT_READY ;
142144}
@@ -542,7 +544,7 @@ static bool __mmce_startup(DISC_INTERFACE *disc)
542544 if (!EXI_Attach (chan , ExtHandler ))
543545 return false;
544546
545- if (MMCE_GetDeviceID (chan , & id ) < 0 || ( id << 16 ) == EXI_MEMCARDPRO || (u16 )id < 0x0101 || ( u16 ) id == 0xFFFF ) {
547+ if (MMCE_GetDeviceID (chan , & id ) != MMCE_RESULT_READY || (u16 )id < 0x0101 ) {
546548 if (chan < EXI_CHANNEL_2 )
547549 EXI_Detach (chan );
548550 return false;
You can’t perform that action at this time.
0 commit comments