From 9f5557ff36bed0a5dde06baf6eae2d728857b7d9 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 28 Jul 2023 20:38:01 +0100 Subject: [PATCH] Add time to browser view (#22) ## Description Add time to browser view Notes that save types could be improved. ## Motivation and Context Nice to show, since there is space, and only shown if supported. ## How Has This Been Tested? ## Screenshots ## Types of changes - [ ] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. Signed-off-by: GITHUB_USER --- src/menu/views/browser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/menu/views/browser.c b/src/menu/views/browser.c index e6ac5110..818b6ee1 100644 --- a/src/menu/views/browser.c +++ b/src/menu/views/browser.c @@ -1,3 +1,4 @@ +#include #include #include @@ -11,7 +12,7 @@ static const char *rom_extensions[] = { "z64", "n64", "v64", NULL }; -static const char *save_extensions[] = { "sav", NULL }; +static const char *save_extensions[] = { "sav", NULL }; // TODO: "eep", "sra", "srm", "fla" could be used if transfered from different flashcarts. static const char *image_extensions[] = { "png", NULL }; static const char *music_extensions[] = { "mp3", NULL }; @@ -354,6 +355,13 @@ static void draw (menu_t *menu, surface_t *d) { } fragment_textf(text_other_actions_x, text_y, "L: Settings"); + time_t current_time = -1; + current_time = time( NULL ); + if( current_time != -1 ) + { + fragment_textf(text_other_actions_x - 288, text_y, ctime( ¤t_time )); + } + rdpq_detach_show(); }