mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-22 02:29:19 +01:00
File info improvements
This commit is contained in:
parent
e2ac852fb5
commit
3d3da61392
@ -62,21 +62,23 @@ void menu_fileinfo(FILINFO current_fileinfo) {
|
||||
vertical_position += (font_vertical_pixels * 2);
|
||||
|
||||
graphics_draw_text(disp, horizontal_start_position, vertical_position, "Size:");
|
||||
sprintf(str_buffer, "%10d %s", (int)current_fileinfo.fsize, "Bytes");
|
||||
sprintf(str_buffer, "%d %s", (int)current_fileinfo.fsize, "Bytes");
|
||||
graphics_draw_text(disp, horizontal_indent, vertical_position += font_vertical_pixels, str_buffer);
|
||||
vertical_position += (font_vertical_pixels * 2);
|
||||
|
||||
graphics_draw_text(disp, horizontal_start_position, vertical_position, "Attributes:");
|
||||
sprintf(str_buffer, "%s%s%s",
|
||||
((current_fileinfo.fattrib & AM_DIR) ? "Directory\n" : "File\n"),
|
||||
((current_fileinfo.fattrib & AM_RDO) ? "Readonly\n" : " "),
|
||||
((current_fileinfo.fattrib & AM_HID) ? "Hidden\n" : " "));
|
||||
sprintf(str_buffer, "%s%s%s%s%s\n",
|
||||
((current_fileinfo.fattrib & AM_DIR) ? "Directory" : "File"),
|
||||
((current_fileinfo.fattrib & AM_RDO) ? " | Readonly" : ""),
|
||||
((current_fileinfo.fattrib & AM_SYS) ? " | System" : ""),
|
||||
((current_fileinfo.fattrib & AM_ARC) ? " | Archive" : ""),
|
||||
((current_fileinfo.fattrib & AM_HID) ? " | Hidden" : ""));
|
||||
|
||||
graphics_draw_text(disp, horizontal_indent, vertical_position += font_vertical_pixels, str_buffer);
|
||||
vertical_position += (font_vertical_pixels * 2);
|
||||
|
||||
graphics_draw_text(disp, horizontal_start_position, vertical_position, "Modified Date:");
|
||||
sprintf(str_buffer, "%d T %d", current_fileinfo.fdate, current_fileinfo.ftime);
|
||||
graphics_draw_text(disp, horizontal_start_position, vertical_position, "Modified Timestamp:");
|
||||
sprintf(str_buffer, "%u-%02u-%02u, %02u:%02u", (current_fileinfo.fdate >> 9) + 1980, current_fileinfo.fdate >> 5 & 15, current_fileinfo.fdate & 31, current_fileinfo.ftime >> 11, current_fileinfo.ftime >> 5 & 63);
|
||||
graphics_draw_text(disp, horizontal_indent, vertical_position += font_vertical_pixels, str_buffer);
|
||||
vertical_position += (font_vertical_pixels * 2);
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <fatfs/ff.h>
|
||||
|
||||
//struct n64_rom_header
|
||||
|
||||
void menu_fileinfo(FILINFO current_fileinfo);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user