diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index 22493c6f76..4c4a0cd90c 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -2477,14 +2477,6 @@ static void menu_common_setting_set_label(char *type_str, } break; #endif - case MENU_FILE_PLAIN: - strlcpy(type_str, "(FILE)", type_str_size); - *w = 6; - break; - case MENU_FILE_DIRECTORY: - strlcpy(type_str, "(DIR)", type_str_size); - *w = 5; - break; case MENU_SETTINGS_DISK_INDEX: { const struct retro_disk_control_callback *control = diff --git a/frontend/menu/disp/rgui.c b/frontend/menu/disp/rgui.c index 67234789cd..b2c766eaeb 100644 --- a/frontend/menu/disp/rgui.c +++ b/frontend/menu/disp/rgui.c @@ -575,6 +575,20 @@ static void rgui_render(void) driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type, i); + if (type_str[0] == '\0' && w == 0) + { + if (type == MENU_FILE_PLAIN) + { + strlcpy(type_str, "(FILE)", sizeof(type_str)); + w = 6; + } + else if (type == MENU_FILE_DIRECTORY) + { + strlcpy(type_str, "(DIR)", sizeof(type_str)); + w = 5; + } + } + char entry_title_buf[256]; char type_str_buf[64]; bool selected = i == driver.menu->selection_ptr; diff --git a/frontend/menu/disp/rmenu.c b/frontend/menu/disp/rmenu.c index 7ccc6b130a..8c4316f934 100644 --- a/frontend/menu/disp/rmenu.c +++ b/frontend/menu/disp/rmenu.c @@ -416,6 +416,20 @@ static void rmenu_render(void) else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label) driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type, i); + if (type_str[0] == '\0' && w == 0) + { + if (type == MENU_FILE_PLAIN) + { + strlcpy(type_str, "(FILE)", sizeof(type_str)); + w = 6; + } + else if (type == MENU_FILE_DIRECTORY) + { + strlcpy(type_str, "(DIR)", sizeof(type_str)); + w = 5; + } + } + char entry_title_buf[256]; char type_str_buf[64]; bool selected = i == menu->selection_ptr; diff --git a/frontend/menu/disp/rmenu_xui.cpp b/frontend/menu/disp/rmenu_xui.cpp index cad1cc95d7..2adefe7995 100644 --- a/frontend/menu/disp/rmenu_xui.cpp +++ b/frontend/menu/disp/rmenu_xui.cpp @@ -635,6 +635,20 @@ static void rmenu_xui_render(void) else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label) driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type, i); + if (type_str[0] == '\0' && w == 0) + { + if (type == MENU_FILE_PLAIN) + { + strlcpy(type_str, "(FILE)", sizeof(type_str)); + w = 6; + } + else if (type == MENU_FILE_DIRECTORY) + { + strlcpy(type_str, "(DIR)", sizeof(type_str)); + w = 5; + } + } + char entry_title_buf[256]; char type_str_buf[64]; bool selected = i == driver.menu->selection_ptr;