Merge pull request #6528 from Tatsuya79/master

XMB thumbnails vertical disposition.
This commit is contained in:
Twinaphex 2018-04-07 04:17:32 +02:00 committed by GitHub
commit 2201e27593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 360 additions and 86 deletions

View File

@ -654,6 +654,8 @@ static const unsigned menu_thumbnails_default = 3;
static const unsigned menu_left_thumbnails_default = 0;
static const bool xmb_vertical_thumbnails = false;
#ifdef IOS
static const bool ui_companion_start_on_boot = false;
#else

View File

@ -1331,6 +1331,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#endif
#ifdef HAVE_XMB
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
SETTING_BOOL("xmb_vertical_thumbnails", &settings->bools.menu_xmb_vertical_thumbnails, true, xmb_vertical_thumbnails, false);
#endif
#endif
#ifdef HAVE_CHEEVOS

View File

@ -148,6 +148,7 @@ typedef struct settings
bool menu_show_reboot;
bool menu_materialui_icons_enable;
bool menu_xmb_shadows_enable;
bool menu_xmb_vertical_thumbnails;
bool menu_content_show_settings;
bool menu_content_show_favorites;
bool menu_content_show_images;

View File

@ -1037,6 +1037,8 @@ MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS,
"thumbnails")
MSG_HASH(MENU_ENUM_LABEL_LEFT_THUMBNAILS,
"left thumbnails")
MSG_HASH(MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS,
"xmb_vertical_thumbnails")
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY,
"thumbnails_directory")
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST,

View File

@ -1633,6 +1633,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS,
"Thumbnails")
MSG_HASH(MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS,
"Left Thumbnails")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS,
"Thumbnails Vertical Disposition")
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
"Thumbnails")
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST,
@ -2932,6 +2934,9 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS,
"Type of thumbnail to display at the left."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS,
"Display the left thumbnail under the right one, on the right side of the screen.")
MSG_HASH(
MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE,
"Shows current date and/or time inside the menu."

View File

@ -297,6 +297,7 @@ default_sublabel_macro(action_bind_sublabel_disk_options,
default_sublabel_macro(action_bind_sublabel_menu_throttle_framerate, MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE)
default_sublabel_macro(action_bind_sublabel_xmb_icon_theme, MENU_ENUM_SUBLABEL_XMB_THEME)
default_sublabel_macro(action_bind_sublabel_xmb_shadows_enable, MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE)
default_sublabel_macro(action_bind_sublabel_xmb_vertical_thumbnails, MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS)
default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME)
default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY)
@ -765,6 +766,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_xmb_shadows_enable);
break;
case MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_xmb_vertical_thumbnails);
break;
case MENU_ENUM_LABEL_XMB_THEME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_xmb_icon_theme);
break;

View File

@ -999,7 +999,9 @@ static void xmb_update_thumbnail_path(void *data, unsigned i, char pos)
xmb_node_t *node = (xmb_node_t*)
file_list_get_userdata_at_offset(selection_buf, i);
if (!string_is_empty(node->fullpath))
if (!string_is_empty(node->fullpath) &&
(pos == 'R' || (pos == 'L' && string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))))
{
if (!string_is_empty(entry.path))
fill_pathname_join(
@ -1037,8 +1039,8 @@ static void xmb_update_thumbnail_path(void *data, unsigned i, char pos)
}
else
{
xmb->left_thumbnail = 0;
goto end;
xmb->left_thumbnail = 0;
goto end;
}
}
}
@ -2498,6 +2500,7 @@ static int xmb_draw_item(
unsigned ticker_limit = 35 * scale_mod[0];
xmb_node_t * node = (xmb_node_t*)
file_list_get_userdata_at_offset(list, i);
settings_t *settings = config_get_ptr();
if (!node)
goto iterate;
@ -2589,7 +2592,12 @@ static int xmb_draw_item(
(!string_is_equal
(thumb_ident,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))
&& xmb->thumbnail)
&& xmb->thumbnail) ||
(!string_is_equal
(left_thumb_ident,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))
&& xmb->left_thumbnail
&& settings->bools.menu_xmb_vertical_thumbnails)
)
ticker_limit = 40 * scale_mod[1];
else
@ -3048,8 +3056,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
return;
scale_factor = (settings->uints.menu_xmb_scale_factor * (float)width) / (1920.0 * 100);
pseudo_font_length = xmb->icon_spacing_horizontal
* 4 - xmb->icon_size / 4;
pseudo_font_length = xmb->icon_spacing_horizontal * 4 - xmb->icon_size / 4;
xmb->frame_count++;
@ -3120,123 +3127,155 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
menu_display_rotate_z(&rotate_draw, video_info);
menu_display_blend_begin(video_info);
/* Do not draw the right thumbnail if there is no space available */
if (((xmb->margins_screen_top +
xmb->icon_size + min_thumb_size) <= height) &&
((xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal +
pseudo_font_length + min_thumb_size) <= width))
/* Save State thumbnail, right side */
if (xmb->savestate_thumbnail)
{
if (xmb->savestate_thumbnail)
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
xmb->margins_screen_left * scale_mod[5]
+ xmb->icon_spacing_horizontal + pseudo_font_length,
xmb->margins_screen_top + xmb->icon_size
+ xmb->savestate_thumbnail_height * scale_mod[4],
xmb->savestate_thumbnail_width * scale_mod[4],
xmb->savestate_thumbnail_height * scale_mod[4],
xmb->savestate_thumbnail);
else if (xmb->thumbnail
&& !string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal + pseudo_font_length,
xmb->margins_screen_top + xmb->icon_size +
xmb->savestate_thumbnail_height * scale_mod[4],
xmb->savestate_thumbnail_width * scale_mod[4],
xmb->savestate_thumbnail_height * scale_mod[4],
xmb->savestate_thumbnail);
}
/* Right thumbnail big size */
if (!settings->bools.menu_xmb_vertical_thumbnails ||
(settings->bools.menu_xmb_vertical_thumbnails && !xmb->left_thumbnail))
{
/* Do not draw the right thumbnail if there is no space available */
if (((xmb->margins_screen_top +
xmb->icon_size + min_thumb_size) <= height) &&
((xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal +
pseudo_font_length + min_thumb_size) <= width))
{
/* Limit thumbnail width */
float thumb_width = 0.0f;
float thumb_height = 0.0f;
float thumb_max_width = (float)width - (xmb->icon_size / 6)
- (xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
#ifdef XMB_DEBUG
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
xmb->thumbnail_width, xmb->thumbnail_height);
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->thumbnail_width * scale_mod[4] > thumb_max_width)
if (xmb->thumbnail
&& !string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
thumb_width = (xmb->thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
thumb_height = (xmb->thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
}
else
{
thumb_width = xmb->thumbnail_width * scale_mod[4];
thumb_height = xmb->thumbnail_height * scale_mod[4];
}
/* Limit thumbnail width */
/* Limit thumbnail height to screen height + margin. */
float thumb_width = 0.0f;
float thumb_height = 0.0f;
float thumb_max_width = (float)width - (xmb->icon_size / 6)
- (xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
if (xmb->margins_screen_top + xmb->icon_size + thumb_height >=
((float)height * under_thumb_margin))
{
thumb_width = thumb_width *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
thumb_height);
thumb_height = thumb_height *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
thumb_height);
#ifdef XMB_DEBUG
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
xmb->thumbnail_width, xmb->thumbnail_height);
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->thumbnail_width * scale_mod[4] > thumb_max_width)
{
thumb_width = (xmb->thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
thumb_height = (xmb->thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
}
else
{
thumb_width = xmb->thumbnail_width * scale_mod[4];
thumb_height = xmb->thumbnail_height * scale_mod[4];
}
/* Limit thumbnail height to screen height + margin. */
if (xmb->margins_screen_top + xmb->icon_size + thumb_height >=
((float)height * under_thumb_margin))
{
thumb_width = thumb_width *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
thumb_height);
thumb_height = thumb_height *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
thumb_height);
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(float)width - (xmb->icon_size / 6) - thumb_max_width +
((thumb_max_width - thumb_width) / 2),
xmb->margins_screen_top + xmb->icon_size + thumb_height,
thumb_width, thumb_height,
xmb->thumbnail);
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(float)width - (xmb->icon_size / 6) - thumb_max_width +
((thumb_max_width - thumb_width) / 2),
xmb->margins_screen_top + xmb->icon_size + thumb_height,
thumb_width, thumb_height,
xmb->thumbnail);
}
}
/* Left thumbnail in the left margin */
/* Do not draw the left thumbnail if there is no space available */
if ((xmb->margins_screen_top + xmb->icon_size *
(!(xmb->depth == 1)? 2.1 : 1) + min_thumb_size)
if (!settings->bools.menu_xmb_vertical_thumbnails &&
(xmb->margins_screen_top + xmb->icon_size *
(!(xmb->depth == 1)? 2.1 : 1) + min_thumb_size)
<= (float)height)
{
/* Left Thumbnail */
/* Left Thumbnail in the left margin */
if (xmb->left_thumbnail
&& !string_is_equal(xmb_thumbnails_ident('L'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
float left_thumb_width = 0.0f;
float left_thumb_height = 0.0f;
/* Limit left thumbnail width */
float left_thumb_width = 0.0f;
float left_thumb_height = 0.0f;
float thumb_max_width = xmb->icon_size * 3.4;
#ifdef XMB_DEBUG
RARCH_LOG("[XMB left thumbnail] width: %.2f, height: %.2f\n",
xmb->left_thumbnail_width, xmb->left_thumbnail_height);
RARCH_LOG("[XMB left thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
{
left_thumb_width = (xmb->left_thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
left_thumb_height = (xmb->left_thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
}
else
{
left_thumb_width = xmb->left_thumbnail_width * scale_mod[4];
left_thumb_height = xmb->left_thumbnail_height * scale_mod[4];
}
/* Limit left thumbnail height to screen height + margin. */
if (xmb->margins_screen_top + xmb->icon_size *
(!(xmb->depth == 1)? 2.1 : 1) +
xmb->left_thumbnail_height >=
left_thumb_height >=
((float)height - (96.0 * scale_factor)))
{
left_thumb_width = xmb->left_thumbnail_width *
left_thumb_width = left_thumb_width *
((((float)height - (96.0 * scale_factor))
- xmb->margins_screen_top -
(xmb->icon_size * (!(xmb->depth == 1)? 2.1 : 1))) /
xmb->left_thumbnail_height);
left_thumb_height);
left_thumb_height = xmb->left_thumbnail_height *
left_thumb_height = left_thumb_height *
((((float)height - (96.0 * scale_factor))
- xmb->margins_screen_top -
(xmb->icon_size * (!(xmb->depth == 1)? 2.1 : 1))) /
xmb->left_thumbnail_height);
left_thumb_height);
}
else
{
left_thumb_width = xmb->left_thumbnail_width;
left_thumb_height = xmb->left_thumbnail_height;
left_thumb_width = left_thumb_width;
left_thumb_height = left_thumb_height;
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(xmb->icon_size / 6) +
((xmb->left_thumbnail_width - left_thumb_width) / 2),
((thumb_max_width - left_thumb_width) / 2),
xmb->margins_screen_top + xmb->icon_size *
(!(xmb->depth == 1)? 2.1 : 1) + left_thumb_height,
left_thumb_width, left_thumb_height,
@ -3244,6 +3283,74 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
}
}
/* No Right Thumbnail, draw only the left one big size */
if (settings->bools.menu_xmb_vertical_thumbnails && !xmb->thumbnail)
{
/* Do not draw the left thumbnail if there is no space available */
if (((xmb->margins_screen_top +
xmb->icon_size + min_thumb_size) <= height) &&
((xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal +
pseudo_font_length + min_thumb_size) <= width))
{
if (xmb->left_thumbnail
&& !string_is_equal(xmb_thumbnails_ident('L'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
/* Limit left thumbnail width */
float left_thumb_width = 0.0f;
float left_thumb_height = 0.0f;
float thumb_max_width = (float)width - (xmb->icon_size / 6)
- (xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
#ifdef XMB_DEBUG
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
xmb->thumbnail_width, xmb->thumbnail_height);
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
{
left_thumb_width = (xmb->left_thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
left_thumb_height = (xmb->left_thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
}
else
{
left_thumb_width = xmb->left_thumbnail_width * scale_mod[4];
left_thumb_height = xmb->left_thumbnail_height * scale_mod[4];
}
/* Limit left thumbnail height to screen height + margin. */
if (xmb->margins_screen_top + xmb->icon_size + left_thumb_height >=
((float)height * under_thumb_margin))
{
left_thumb_width = left_thumb_width *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
left_thumb_height);
left_thumb_height = left_thumb_height *
((((float)height * under_thumb_margin) -
xmb->margins_screen_top - xmb->icon_size) /
left_thumb_height);
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(float)width - (xmb->icon_size / 6) - thumb_max_width +
((thumb_max_width - left_thumb_width) / 2),
xmb->margins_screen_top + xmb->icon_size + left_thumb_height,
left_thumb_width, left_thumb_height,
xmb->left_thumbnail);
}
}
}
/* Clock image */
menu_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
@ -3421,6 +3528,139 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
}
}
/* Right side 2 thumbnails on top of each other */
/* here to be displayed above the horizontal icons */
if (xmb->left_thumbnail && xmb->thumbnail && settings->bools.menu_xmb_vertical_thumbnails)
{
/* Do not draw the right thumbnail if there is no space available */
if (((xmb->margins_screen_top +
xmb->icon_size + min_thumb_size) <= height) &&
((xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal +
pseudo_font_length + min_thumb_size) <= width))
{
if (xmb->thumbnail &&
!string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
/* Limit right thumbnail width */
float thumb_width = 0.0f;
float thumb_height = 0.0f;
float thumb_max_width = (float)width - (xmb->icon_size / 6) -
(xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
#ifdef XMB_DEBUG
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
xmb->thumbnail_width, xmb->thumbnail_height);
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->thumbnail_width * scale_mod[4] > thumb_max_width)
{
thumb_width = (xmb->thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
thumb_height = (xmb->thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->thumbnail_width * scale_mod[4]));
}
else
{
thumb_width = xmb->thumbnail_width * scale_mod[4];
thumb_height = xmb->thumbnail_height * scale_mod[4];
}
/* Limit right thumbnail height to usable area. */
if (thumb_height >=
((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2)
{
thumb_width = thumb_width *
((((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) /
thumb_height);
thumb_height = thumb_height *
((((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) /
thumb_height);
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(float)width - (xmb->icon_size / 6) - thumb_max_width +
((thumb_max_width - thumb_width) / 2),
xmb->icon_size + ((((float)height / 2 -
(xmb->icon_size + (xmb->icon_size/12))) - thumb_height) / 2) +
thumb_height,
thumb_width, thumb_height,
xmb->thumbnail);
}
}
/* Do not draw the left thumbnail if there is no space available */
if (((xmb->margins_screen_top +
xmb->icon_size + min_thumb_size) <= height) &&
((xmb->margins_screen_left * scale_mod[5] +
xmb->icon_spacing_horizontal +
pseudo_font_length + min_thumb_size) <= width))
{
if (xmb->left_thumbnail &&
!string_is_equal(xmb_thumbnails_ident('L'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
/* Limit left thumbnail width */
float left_thumb_width = 0.0f;
float left_thumb_height = 0.0f;
float thumb_max_width = (float)width - (xmb->icon_size / 6) -
(xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
#ifdef XMB_DEBUG
RARCH_LOG("[XMB left thumbnail] width: %.2f, height: %.2f\n",
xmb->left_thumbnail_width, xmb->left_thumbnail_height);
RARCH_LOG("[XMB left thumbnail] w: %.2f, h: %.2f\n", width, height);
#endif
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
{
left_thumb_width = (xmb->left_thumbnail_width * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
left_thumb_height = (xmb->left_thumbnail_height * scale_mod[4]) *
(thumb_max_width / (xmb->left_thumbnail_width * scale_mod[4]));
}
else
{
left_thumb_width = xmb->left_thumbnail_width * scale_mod[4];
left_thumb_height = xmb->left_thumbnail_height * scale_mod[4];
}
/* Limit left thumbnail height to usable area. */
if (left_thumb_height >=
((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2)
{
left_thumb_width = left_thumb_width *
((((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) /
left_thumb_height);
left_thumb_height = left_thumb_height *
((((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) /
left_thumb_height);
}
xmb_draw_thumbnail(video_info,
xmb, &coord_white[0], width, height,
(float)width - (xmb->icon_size / 6) - thumb_max_width +
((thumb_max_width - left_thumb_width) / 2),
xmb->icon_size +
(((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) +
(((((float)height - ((xmb->icon_size / 6) * 2) - xmb->icon_size) / 2) -
left_thumb_height) / 2) + left_thumb_height,
left_thumb_width, left_thumb_height,
xmb->left_thumbnail);
}
}
}
menu_display_blend_end(video_info);
/* Vertical icons */
@ -3532,7 +3772,7 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
xmb->thumbnail_width = 1024.0 * scale_factor;
xmb->left_thumbnail_width = 430.0 * scale_factor;
xmb->left_thumbnail_width = 1024.0 * scale_factor;
xmb->savestate_thumbnail_width= 460.0 * scale_factor;
xmb->cursor_size = 64.0 * scale_factor;

View File

@ -5347,6 +5347,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_LEFT_THUMBNAILS,
PARSE_ONLY_UINT, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS,
PARSE_ONLY_BOOL, false);
info->need_refresh = true;
info->need_push = true;

View File

@ -6086,6 +6086,21 @@ static bool setting_append_list(
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_xmb_vertical_thumbnails,
MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS,
MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS,
xmb_vertical_thumbnails,
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(

View File

@ -774,6 +774,7 @@ enum msg_hash_enums
MENU_LABEL(XMB_RIBBON_ENABLE),
MENU_LABEL(THUMBNAILS),
MENU_LABEL(LEFT_THUMBNAILS),
MENU_LABEL(XMB_VERTICAL_THUMBNAILS),
MENU_LABEL(TIMEDATE_ENABLE),
MENU_LABEL(BATTERY_LEVEL_ENABLE),
MENU_LABEL(MATERIALUI_MENU_COLOR_THEME),