mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-22 02:29:19 +01:00
Update file locations
Add directory listing
This commit is contained in:
parent
3a2b908a4f
commit
6aafc026c5
2
Makefile
2
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))))
|
||||
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user