diff --git a/source/libs/fatfs/ffconf.h b/source/libs/fatfs/ffconf.h index a086f13..ca13b33 100644 --- a/source/libs/fatfs/ffconf.h +++ b/source/libs/fatfs/ffconf.h @@ -191,7 +191,7 @@ #define FF_MIN_SS 512 -#define FF_MAX_SS 4096 +#define FF_MAX_SS 512 /* This set of options configures the range of sector size to be supported. (512, / 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and / harddisk. But a larger value may be required for on-board flash memory and some diff --git a/source/main.c b/source/main.c index d7e8972..117c9f8 100644 --- a/source/main.c +++ b/source/main.c @@ -153,7 +153,6 @@ extern void pivot_stack(u32 stack_top); void ipl_main() { - bool sd_mounted = false; config_hw(); pivot_stack(IPL_STACK_TOP); heap_init(IPL_HEAP_START); @@ -164,8 +163,6 @@ void ipl_main() gfx_con_init(); display_backlight_pwm_init(); - - sd_mounted = sd_mount(); - meme_main(sd_mounted); + meme_main(); sd_unmount(); } diff --git a/source/meme/main.c b/source/meme/main.c index 9765fcb..7ac6461 100644 --- a/source/meme/main.c +++ b/source/meme/main.c @@ -9,24 +9,27 @@ #include "../storage/sdmmc.h" #include "graphics.h" -void meme_main(bool sdinit){ +extern bool sd_mount(); + +void meme_main(){ utils_gfx_init(); //static const u32 colors[7] = {COLOR_RED, COLOR_ORANGE, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_VIOLET, COLOR_DEFAULT}; //gfx_printf("%k%pTegraExplorer, made by SuchMemeManySkill \n%k%p", colors[6], colors[3], colors[3], colors[6]); - /* + sdmmc_storage_t storage; sdmmc_t sdmmc; sdmmc_storage_init_mmc(&storage, &sdmmc, SDMMC_4, SDMMC_BUS_WIDTH_8, 4); sdmmc_storage_set_mmc_partition(&storage, 1); - */ - //f_rename("sd:/yeet.txt", "sd:/yote.txt"); - + //f_rename("sd:/yeet.txt", "sd:/yote.txt"); + bool sd_mounted = false; + sd_mounted = sd_mount(); + char *itemsinfolder[500]; unsigned int muhbits[500]; - if (sdinit){ + if (sd_mounted){ sdexplorer(itemsinfolder, muhbits); //write file and folder menu diff --git a/source/meme/main.h b/source/meme/main.h index 1bdb733..146c2ed 100644 --- a/source/meme/main.h +++ b/source/meme/main.h @@ -1,3 +1,3 @@ #pragma once -void meme_main(bool sdinit); \ No newline at end of file +void meme_main(); \ No newline at end of file