diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-04-01 09:35:45 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-04-01 08:39:55 -0500 |
commit | 2570909e52b4121d69b0bc6638af8882dae87176 (patch) | |
tree | 8636d734a1519f7d0c4d95e6ff329906a6c53360 /apps/menus | |
parent | 8e9a840d1d7a09cbd6ad88a8f3548cdd07425b7b (diff) | |
download | rockbox-2570909e52b4121d69b0bc6638af8882dae87176.tar.gz rockbox-2570909e52b4121d69b0bc6638af8882dae87176.zip |
[Feature] Add root_realpath to Rockbox Info
Change-Id: I5a6bb78495a00960d0aa0f1a3fad227e4b8e17f3
Diffstat (limited to 'apps/menus')
-rw-r--r-- | apps/menus/main_menu.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 71763af0ee..73c9f7be33 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -137,6 +137,7 @@ enum infoscreenorder | |||
137 | #ifdef HAVE_RECORDING | 137 | #ifdef HAVE_RECORDING |
138 | INFO_REC_DIR, | 138 | INFO_REC_DIR, |
139 | #endif | 139 | #endif |
140 | INFO_ROOT_DIR, | ||
140 | INFO_VERSION, | 141 | INFO_VERSION, |
141 | #if CONFIG_RTC | 142 | #if CONFIG_RTC |
142 | INFO_DATE, | 143 | INFO_DATE, |
@@ -241,7 +242,9 @@ static const char* info_getname(int selected_item, void *data, | |||
241 | snprintf(buffer, buffer_len, "%s %s", str(LANG_REC_DIR), global_settings.rec_directory); | 242 | snprintf(buffer, buffer_len, "%s %s", str(LANG_REC_DIR), global_settings.rec_directory); |
242 | break; | 243 | break; |
243 | #endif | 244 | #endif |
244 | 245 | case INFO_ROOT_DIR: | |
246 | snprintf(buffer, buffer_len, "%s %s", str(LANG_DISPLAY_FULL_PATH), root_realpath()); | ||
247 | break; | ||
245 | case INFO_BUFFER: /* buffer */ | 248 | case INFO_BUFFER: /* buffer */ |
246 | { | 249 | { |
247 | long kib = audio_buffer_size() >> 10; /* to KiB */ | 250 | long kib = audio_buffer_size() >> 10; /* to KiB */ |
@@ -336,27 +339,14 @@ static int info_speak_item(int selected_item, void * data) | |||
336 | talk_id(LANG_REC_DIR, false); | 339 | talk_id(LANG_REC_DIR, false); |
337 | if (global_settings.rec_directory[0]) | 340 | if (global_settings.rec_directory[0]) |
338 | { | 341 | { |
339 | long *pathsep = NULL; | 342 | talk_fullpath(global_settings.rec_directory, true); |
340 | char rec_directory[MAX_PATHNAME+1]; | ||
341 | char *s; | ||
342 | strcpy(rec_directory, global_settings.rec_directory); | ||
343 | s = rec_directory; | ||
344 | if ((strlen(s) > 1) && (s[strlen(s) - 1] == '/')) | ||
345 | s[strlen(s) - 1] = 0; | ||
346 | while (s) | ||
347 | { | ||
348 | s = strchr(s + 1, '/'); | ||
349 | if (s) | ||
350 | s[0] = 0; | ||
351 | talk_dir_or_spell(rec_directory, pathsep, true); | ||
352 | if (s) | ||
353 | s[0] = '/'; | ||
354 | pathsep = TALK_IDARRAY(VOICE_CHAR_SLASH); | ||
355 | } | ||
356 | } | 343 | } |
357 | break; | 344 | break; |
358 | #endif | 345 | #endif |
359 | 346 | case INFO_ROOT_DIR: | |
347 | talk_id(LANG_DISPLAY_FULL_PATH, false); | ||
348 | talk_fullpath(root_realpath(), true); | ||
349 | break; | ||
360 | case INFO_BUFFER: /* buffer */ | 350 | case INFO_BUFFER: /* buffer */ |
361 | { | 351 | { |
362 | talk_id(LANG_BUFFER_STAT, false); | 352 | talk_id(LANG_BUFFER_STAT, false); |