From c854d0916b33db960e92266fe2c16866e3f9a02e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 24 Apr 2019 01:48:28 +0200 Subject: [PATCH] (XMB) XMB honors the 'show menu sublabels' setting now - was previously RGUI only --- config.def.h | 2 +- menu/drivers/xmb.c | 26 +++++++++++++++----------- menu/menu_setting.c | 31 ++++++++++++++----------------- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/config.def.h b/config.def.h index ca91b51560..4dbbefe3a2 100644 --- a/config.def.h +++ b/config.def.h @@ -331,7 +331,7 @@ static bool menu_show_core_updater = false; #else static bool menu_show_core_updater = true; #endif -static bool menu_show_sublabels = false; +static bool menu_show_sublabels = true; static unsigned menu_ticker_type = TICKER_TYPE_BOUNCE; static float menu_ticker_speed = 1.0f; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index c42cc101dd..00b802fd69 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2801,21 +2801,25 @@ static int xmb_draw_item( menu_animation_ticker(&ticker); label_offset = xmb->margins_label_top; - if (i == current && width > 320 && height > 240 - && !string_is_empty(entry->sublabel)) + + if (settings->bools.menu_show_sublabels) { - char entry_sublabel[512] = {0}; + if (i == current && width > 320 && height > 240 + && !string_is_empty(entry->sublabel)) + { + char entry_sublabel[512] = {0}; - label_offset = - xmb->margins_label_top; + label_offset = - xmb->margins_label_top; - word_wrap(entry_sublabel, entry->sublabel, 50 * scale_mod[3], true); + word_wrap(entry_sublabel, entry->sublabel, 50 * scale_mod[3], true); - xmb_draw_text(video_info, xmb, entry_sublabel, - node->x + xmb->margins_screen_left + - xmb->icon_spacing_horizontal + xmb->margins_label_left, - xmb->margins_screen_top + node->y + xmb->margins_label_top*3.5, - 1, node->label_alpha, TEXT_ALIGN_LEFT, - width, height, xmb->font2); + xmb_draw_text(video_info, xmb, entry_sublabel, + node->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + xmb->margins_label_left, + xmb->margins_screen_top + node->y + xmb->margins_label_top*3.5, + 1, node->label_alpha, TEXT_ALIGN_LEFT, + width, height, xmb->font2); + } } xmb_draw_text(video_info, xmb, tmp, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 91e2d4fec3..0be5eb29f9 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -9675,23 +9675,20 @@ static bool setting_append_list( general_read_handler, SD_FLAG_ADVANCED); - if (string_is_equal(settings->arrays.menu_driver, "rgui")) - { - CONFIG_BOOL( - list, list_info, - &settings->bools.menu_show_sublabels, - MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS, - MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, - true, - MENU_ENUM_LABEL_VALUE_OFF, - MENU_ENUM_LABEL_VALUE_ON, - &group_info, - &subgroup_info, - parent_group, - general_write_handler, - general_read_handler, - SD_FLAG_NONE); - } + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_sublabels, + MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, + menu_show_sublabels, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group);