Update file locations

Add directory listing
This commit is contained in:
Robin Jones 2023-02-23 02:40:07 +00:00
parent 3a2b908a4f
commit 6aafc026c5
8 changed files with 17 additions and 2 deletions

View File

@ -17,7 +17,7 @@ SRCS = \
menu/menu.c \ menu/menu.c \
utils/fs.c \ utils/fs.c \
libs/toml/toml.c \ libs/toml/toml.c \
libs/menu_utils/menu.c \ libs/menu_utils/src/menu.c \
main.c main.c
OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS)))) OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS))))

View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

@ -121,7 +121,22 @@ void menu_run (menu_t *menu) {
} }
else { else {
printf("N64 Flashcart Menu\n\n"); 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: wait for a key input
} }
// TODO: write menu state to SD card // TODO: write menu state to SD card