Add check for unmounted SD card in emmc (#26)
* Add check for unmounted SD card * Implement it the better way and remove message Meme doesn't like * Remove comma and remove dump option if no sd is inserted Hopefully the last commit to this PR. Hopefully.
This commit is contained in:
@@ -28,6 +28,7 @@ extern sdmmc_storage_t storage;
|
||||
extern emmc_part_t *system_part;
|
||||
extern char *clipboard;
|
||||
extern u8 clipboardhelper;
|
||||
extern bool sd_mounted;
|
||||
|
||||
|
||||
void addEntry(emmc_part_t *part, u8 property_GPT, int spot){
|
||||
@@ -73,6 +74,12 @@ int fillMmcMenu(short mmcType){
|
||||
|
||||
mu_createObjects(count, &mmcMenuEntries);
|
||||
|
||||
if (!sd_mounted)
|
||||
sd_mount();
|
||||
|
||||
SETBIT(mmcmenu_filemenu[3].property, ISHIDE, !sd_mounted);
|
||||
SETBIT(mmcmenu_start[1].property, ISHIDE, !sd_mounted);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
mu_copySingle(mmcmenu_start[i].name, mmcmenu_start[i].storage, mmcmenu_start[i].property, &mmcMenuEntries[i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user