(Menu) Move MENU_FILE_PLAIN/MENU_FILE_DIRECTORY label setting to

display driver
This commit is contained in:
twinaphex 2014-09-01 20:48:52 +02:00
parent 8af1a77e5a
commit 75d21299c3
4 changed files with 42 additions and 8 deletions

View File

@ -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 =

View File

@ -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;

View File

@ -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;

View File

@ -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;