mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(RMenu) Cut down on rmenu files' label representation
This commit is contained in:
parent
21e85d1a17
commit
c3606c2905
@ -268,47 +268,27 @@ static void rmenu_render(void)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
/* Pretty-print libretro cores from menu. */
|
||||
if (
|
||||
!strcmp(label, "core_list") ||
|
||||
!strcmp(label, "deferred_core_list"))
|
||||
if (type == MENU_FILE_CORE)
|
||||
{
|
||||
if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
strlcpy(type_str, "(CORE)", sizeof(type_str));
|
||||
file_list_get_alt_at_offset(menu->selection_buf, i, &path);
|
||||
w = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
strlcpy(type_str, "(CORE)", sizeof(type_str));
|
||||
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
|
||||
w = 6;
|
||||
}
|
||||
else if (menu_type == MENU_SETTINGS_CONFIG ||
|
||||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
|
||||
!strcmp(label, "video_filter") ||
|
||||
!strcmp(label, "audio_dsp_plugin") ||
|
||||
menu_type == MENU_SETTINGS_DISK_APPEND ||
|
||||
menu_type_is == MENU_FILE_DIRECTORY)
|
||||
else if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
strlcpy(type_str, "(FILE)", sizeof(type_str));
|
||||
w = 6;
|
||||
}
|
||||
else if (type == MENU_FILE_USE_DIRECTORY)
|
||||
{
|
||||
*type_str = '\0';
|
||||
w = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
strlcpy(type_str, "(FILE)", sizeof(type_str));
|
||||
w = 6;
|
||||
}
|
||||
else if (type == MENU_FILE_USE_DIRECTORY)
|
||||
{
|
||||
*type_str = '\0';
|
||||
w = 0;
|
||||
}
|
||||
else if (type == MENU_FILE_DIRECTORY)
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
||||
strlcpy(type_str,
|
||||
@ -322,20 +302,6 @@ static void rmenu_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 == menu->selection_ptr;
|
||||
|
@ -468,46 +468,27 @@ static void rmenu_xui_render(void)
|
||||
driver.menu->shader, type_str, sizeof(type_str), type);
|
||||
}
|
||||
else
|
||||
// Pretty-print libretro cores from menu.
|
||||
if (!strcmp(label, "core_list") ||
|
||||
!strcmp(label, "deferred_core_list"))
|
||||
if (type == MENU_FILE_CORE)
|
||||
{
|
||||
if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
strlcpy(type_str, "(CORE)", sizeof(type_str));
|
||||
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
|
||||
w = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
strlcpy(type_str, "(CORE)", sizeof(type_str));
|
||||
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
|
||||
w = 6;
|
||||
}
|
||||
else if (menu_type == MENU_SETTINGS_CONFIG ||
|
||||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
|
||||
!strcmp(label, "video_filter") ||
|
||||
!strcmp(label, "audio_dsp_plugin") ||
|
||||
menu_type == MENU_SETTINGS_DISK_APPEND ||
|
||||
menu_type_is == MENU_FILE_DIRECTORY)
|
||||
else if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
strlcpy(type_str, "(FILE)", sizeof(type_str));
|
||||
w = 6;
|
||||
}
|
||||
else if (type == MENU_FILE_USE_DIRECTORY)
|
||||
{
|
||||
*type_str = '\0';
|
||||
w = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
strlcpy(type_str, "(FILE)", sizeof(type_str));
|
||||
w = 6;
|
||||
}
|
||||
else if (type == MENU_FILE_USE_DIRECTORY)
|
||||
{
|
||||
*type_str = '\0';
|
||||
w = 0;
|
||||
}
|
||||
else if (type == MENU_FILE_DIRECTORY)
|
||||
{
|
||||
strlcpy(type_str, "(DIR)", sizeof(type_str));
|
||||
type = MENU_FILE_DIRECTORY;
|
||||
w = 5;
|
||||
}
|
||||
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
||||
strlcpy(type_str,
|
||||
@ -521,20 +502,6 @@ static void rmenu_xui_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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user