diff --git a/Makefile b/Makefile index d57b52ff..7c26572b 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ SRCS = \ menu/menu.c \ utils/fs.c \ libs/toml/toml.c \ - libs/menu_utils/menu.c \ + libs/menu_utils/src/menu.c \ main.c OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS)))) diff --git a/src/libs/menu_utils/mem_pool.h b/src/libs/menu_utils/include/mem_pool.h similarity index 100% rename from src/libs/menu_utils/mem_pool.h rename to src/libs/menu_utils/include/mem_pool.h diff --git a/src/libs/menu_utils/memory_alloc.h b/src/libs/menu_utils/include/memory_alloc.h similarity index 100% rename from src/libs/menu_utils/memory_alloc.h rename to src/libs/menu_utils/include/memory_alloc.h diff --git a/src/libs/menu_utils/menu.h b/src/libs/menu_utils/include/menu.h similarity index 100% rename from src/libs/menu_utils/menu.h rename to src/libs/menu_utils/include/menu.h diff --git a/src/libs/menu_utils/menu.png b/src/libs/menu_utils/sample_assets/menu.png similarity index 100% rename from src/libs/menu_utils/menu.png rename to src/libs/menu_utils/sample_assets/menu.png diff --git a/src/libs/menu_utils/mem_pool.c b/src/libs/menu_utils/src/mem_pool.c similarity index 100% rename from src/libs/menu_utils/mem_pool.c rename to src/libs/menu_utils/src/mem_pool.c diff --git a/src/libs/menu_utils/menu.c b/src/libs/menu_utils/src/menu.c similarity index 100% rename from src/libs/menu_utils/menu.c rename to src/libs/menu_utils/src/menu.c diff --git a/src/menu/menu.c b/src/menu/menu.c index f2bd8c7f..adbc065d 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -121,7 +121,22 @@ void menu_run (menu_t *menu) { } else { printf("N64 Flashcart Menu\n\n"); - wait_ms(2000); + printf("File list:\n"); + DIR *dp; + struct dirent *ep; + dp = opendir ("sd://"); + if (dp != NULL) + { + while ((ep = readdir (dp)) != NULL) + puts (ep->d_name); + + (void) closedir (dp); + return 0; + } + else + { + printf("Couldn't open the directory"); + } // TODO: wait for a key input } // TODO: write menu state to SD card