From 4f01b3f5d5e128fa6d2bb5227e945dc1efe93189 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Tue, 30 Apr 2024 00:49:18 +0100 Subject: [PATCH] Minor improvments --- src/menu/views/joypad_controller_pak.c | 29 ++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/menu/views/joypad_controller_pak.c b/src/menu/views/joypad_controller_pak.c index 03d05706..32633874 100644 --- a/src/menu/views/joypad_controller_pak.c +++ b/src/menu/views/joypad_controller_pak.c @@ -5,17 +5,20 @@ static int accessory_is_cpak[4]; static cpak_info_t cpak_info; static char *format_entries_info(entry_structure_t *entries) { - // for (int j = 0; j < 16; j++) - // { - // if (entries[j].valid) - // { - // sprintf(buffer + strlen(buffer), "%s - %d blocks\n", entries[j].name, entries[j].blocks); - // } - // else - // { - // sprintf(buffer + strlen(buffer), "(EMPTY)\n"); - // } - // } + for (int j = 0; j < 16; j++) + { + if (entries[j].valid) + { + // FIXME: add entry to the string array + // sprintf(buffer + strlen(buffer), "%s - %d blocks\n", entries[j].name, entries[j].blocks); + } + else + { + // FIXME: add entry to the string array + // sprintf(buffer + strlen(buffer), "(EMPTY)\n"); + } + } + // return buffer; return " unknown."; } @@ -63,7 +66,7 @@ static void draw (menu_t *menu, surface_t *d) { "\n" "\n" "Controller Pak (1).\n" - "Free space: %d blocks \n" + "Free space: %d blocks. \n" "Entries: \n%s", cpak_info.free_space, format_entries_info(cpak_info.entries) @@ -75,7 +78,7 @@ static void draw (menu_t *menu, surface_t *d) { "\n" "\n" "Controller Pak (1).\n" - "Not inserted.\n" + " Not inserted.\n" ); }