Merge pull request #6863 from Brunnis/xmb-thumbnails-issue

Implement fix for thumbnails not showing up in Quick Menu as well as …
This commit is contained in:
hizzlekizzle 2018-06-07 13:26:32 -05:00 committed by GitHub
commit 9271a7505f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2163,12 +2163,18 @@ static void xmb_populate_entries(void *data,
xmb_selection_pointer_changed(xmb, false);
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
if (!string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
xmb_update_thumbnail_path(xmb, 0, 'R');
xmb_update_thumbnail_image(xmb);
}
xmb_update_savestate_thumbnail_image(xmb);
if (!string_is_equal(xmb_thumbnails_ident('L'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
xmb_update_thumbnail_path(xmb, 0, 'L');
xmb_update_thumbnail_image(xmb);
}
return;
}
@ -2975,6 +2981,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
float pseudo_font_length = 0.0f;
xmb_handle_t *xmb = (xmb_handle_t*)data;
settings_t *settings = config_get_ptr();
unsigned xmb_system_tab = xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr);
bool hide_thumbnails = false;
if (!xmb)
return;
@ -3065,8 +3073,14 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->savestate_thumbnail);
}
/* This is used for hiding thumbnails when going into sub-levels in the
* Quick Menu as well as when selecting "Information" for a playlist entry.
* NOTE: This is currently a pretty crude check, simply going by menu depth
* and not specifically identifying which menu we're actually in. */
hide_thumbnails = xmb_system_tab > XMB_SYSTEM_TAB_SETTINGS && xmb->depth > 2;
/* Right thumbnail big size */
if (xmb->use_ps3_layout &&
if (!hide_thumbnails && !xmb->savestate_thumbnail && xmb->use_ps3_layout &&
(!settings->bools.menu_xmb_vertical_thumbnails ||
(settings->bools.menu_xmb_vertical_thumbnails && !xmb->left_thumbnail)))
{
@ -3137,7 +3151,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
/* Left thumbnail in the left margin */
/* Do not draw the left thumbnail if there is no space available */
if (xmb->use_ps3_layout &&
if (!hide_thumbnails && xmb->use_ps3_layout &&
!settings->bools.menu_xmb_vertical_thumbnails &&
(xmb->margins_screen_top + xmb->icon_size *
(!(xmb->depth == 1)? 2.1 : 1) + min_thumb_size)
@ -3205,7 +3219,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
}
/* No Right Thumbnail, draw only the left one big size */
if (xmb->use_ps3_layout &&
if (!hide_thumbnails && !xmb->savestate_thumbnail && xmb->use_ps3_layout &&
settings->bools.menu_xmb_vertical_thumbnails && !xmb->thumbnail)
{
/* Do not draw the left thumbnail if there is no space available */
@ -3275,7 +3289,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
/* PSP Layout Only - Left thumbnail in the left margin */
/* Do not draw the left thumbnail if there is no space available */
if (!xmb->use_ps3_layout &&
if (!hide_thumbnails && !xmb->use_ps3_layout &&
(xmb->margins_screen_top + xmb->icon_size * 1.5)
<= (float)height)
{
@ -3514,7 +3528,7 @@ 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->use_ps3_layout &&
if (!hide_thumbnails && !xmb->savestate_thumbnail && xmb->use_ps3_layout &&
xmb->left_thumbnail && xmb->thumbnail &&
settings->bools.menu_xmb_vertical_thumbnails)
{
@ -4472,11 +4486,17 @@ static void xmb_context_reset(void *data, bool is_threaded)
xmb_context_reset_horizontal_list(xmb);
if (!string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
xmb_update_thumbnail_path(xmb, 0, 'R');
xmb_update_thumbnail_image(xmb);
if (!string_is_equal(xmb_thumbnails_ident('R'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
}
if (!string_is_equal(xmb_thumbnails_ident('L'),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
{
xmb_update_thumbnail_path(xmb, 0, 'L');
xmb_update_thumbnail_image(xmb);
}
xmb_update_savestate_thumbnail_image(xmb);
free(iconpath);