diff --git a/include/fs.h b/include/fs.h index 7fa8702..40d876a 100644 --- a/include/fs.h +++ b/include/fs.h @@ -23,7 +23,7 @@ #define FS_MAX_DEVICES (2) #define FS_MAX_DRIVES (FF_VOLUMES) -#define FS_DRIVE_NAMES FF_VOLUME_STRS +#define FS_DRIVE_NAMES "sdmc:/","twln:/","twlp:/","nand:/" #define FS_MAX_FILES (5) diff --git a/source/arm9/dev.c b/source/arm9/dev.c index 27c0bd4..f9decff 100644 --- a/source/arm9/dev.c +++ b/source/arm9/dev.c @@ -148,7 +148,7 @@ do { // if sd card is ready, stop polling - if(sdmmc_sd_is_active()) + if(sdmmc_read16(REG_SDSTATUS0) & TMIO_STAT0_SIGSTATE) break; TIMER_sleep(2); @@ -194,7 +194,7 @@ bool sdmmc_sd_is_active(void) { - return (sdmmc_read16(REG_SDSTATUS0) & TMIO_STAT0_SIGSTATE); + return (sdmmc_read16(REG_SDSTATUS0) & TMIO_STAT0_SIGSTATE) && dev_sd.initialized; } u32 sdmmc_sd_get_sector_count(void) @@ -449,7 +449,7 @@ bool sdmmc_dnand_is_active(void) { - return sdmmc_rnand_is_active(); + return sdmmc_rnand_is_active() && dev_dnand.dev.initialized; } @@ -478,8 +478,7 @@ bool wififlash_is_active(void) { - if(dev_wififlash.initialized) return true; - return wififlash_init(); + return dev_wififlash.initialized; } u32 wififlash_get_sector_count(void) diff --git a/thirdparty/fatfs/diskio.c b/thirdparty/fatfs/diskio.c index 4cd138a..98536fc 100644 --- a/thirdparty/fatfs/diskio.c +++ b/thirdparty/fatfs/diskio.c @@ -36,7 +36,7 @@ switch(pdrv) { case FATFS_DEV_NUM_SD: - if(!dev_sdcard->is_active() || !dev_sdcard->initialized) stat = STA_NOINIT; + if(!dev_sdcard->is_active()) stat = STA_NOINIT; break; case FATFS_DEV_NUM_TWL_NAND: if(!dev_decnand->is_active()) stat = STA_NOINIT;